├── .gitignore ├── Documents └── everything-curl.pdf ├── Makefile ├── README.md ├── components ├── curl │ ├── README.md │ ├── ca-certificates.crt │ ├── component.mk │ ├── esp32_curl_paches.zip │ ├── include │ │ ├── Makefile.am │ │ ├── README │ │ └── curl │ │ │ ├── .gitignore │ │ │ ├── Makefile.am │ │ │ ├── curl.h │ │ │ ├── curlbuild.h │ │ │ ├── curlbuild.h.cmake │ │ │ ├── curlbuild.h.dist │ │ │ ├── curlbuild.h.in │ │ │ ├── curlrules.h │ │ │ ├── curlver.h │ │ │ ├── easy.h │ │ │ ├── mprintf.h │ │ │ ├── multi.h │ │ │ ├── stdcheaders.h │ │ │ ├── system.h │ │ │ └── typecheck-gcc.h │ ├── lib │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── Makefile.Watcom │ │ ├── Makefile.am │ │ ├── Makefile.b32 │ │ ├── Makefile.inc │ │ ├── Makefile.m32 │ │ ├── Makefile.netware │ │ ├── Makefile.vxworks │ │ ├── amigaos.c │ │ ├── amigaos.h │ │ ├── arpa_telnet.h │ │ ├── asyn-ares.c │ │ ├── asyn-thread.c │ │ ├── asyn.h │ │ ├── base64.c │ │ ├── checksrc.pl │ │ ├── config-amigaos.h │ │ ├── config-dos.h │ │ ├── config-mac.h │ │ ├── config-os400.h │ │ ├── config-riscos.h │ │ ├── config-symbian.h │ │ ├── config-tpf.h │ │ ├── config-vxworks.h │ │ ├── config-win32.h │ │ ├── config-win32ce.h │ │ ├── conncache.c │ │ ├── conncache.h │ │ ├── connect.c │ │ ├── connect.h │ │ ├── content_encoding.c │ │ ├── content_encoding.h │ │ ├── cookie.c │ │ ├── cookie.h │ │ ├── curl_addrinfo.c │ │ ├── curl_addrinfo.h │ │ ├── curl_base64.h │ │ ├── curl_config.h │ │ ├── curl_config.h.cmake │ │ ├── curl_des.c │ │ ├── curl_des.h │ │ ├── curl_endian.c │ │ ├── curl_endian.h │ │ ├── curl_fnmatch.c │ │ ├── curl_fnmatch.h │ │ ├── curl_gethostname.c │ │ ├── curl_gethostname.h │ │ ├── curl_gssapi.c │ │ ├── curl_gssapi.h │ │ ├── curl_hmac.h │ │ ├── curl_ldap.h │ │ ├── curl_md4.h │ │ ├── curl_md5.h │ │ ├── curl_memory.h │ │ ├── curl_memrchr.c │ │ ├── curl_memrchr.h │ │ ├── curl_multibyte.c │ │ ├── curl_multibyte.h │ │ ├── curl_ntlm_core.c │ │ ├── curl_ntlm_core.h │ │ ├── curl_ntlm_wb.c │ │ ├── curl_ntlm_wb.h │ │ ├── curl_path.c │ │ ├── curl_path.h │ │ ├── curl_printf.h │ │ ├── curl_rtmp.c │ │ ├── curl_rtmp.h │ │ ├── curl_sasl.c │ │ ├── curl_sasl.h │ │ ├── curl_sec.h │ │ ├── curl_setup.h │ │ ├── curl_setup_once.h │ │ ├── curl_sha256.h │ │ ├── curl_sspi.c │ │ ├── curl_sspi.h │ │ ├── curl_threads.c │ │ ├── curl_threads.h │ │ ├── curlx.h │ │ ├── dict.c │ │ ├── dict.h │ │ ├── dotdot.c │ │ ├── dotdot.h │ │ ├── easy.c │ │ ├── easyif.h │ │ ├── escape.c │ │ ├── escape.h │ │ ├── file.c │ │ ├── file.h │ │ ├── fileinfo.c │ │ ├── fileinfo.h │ │ ├── firefox-db2pem.sh │ │ ├── formdata.c │ │ ├── formdata.h │ │ ├── ftp.c │ │ ├── ftp.h │ │ ├── ftplistparser.c │ │ ├── ftplistparser.h │ │ ├── getenv.c │ │ ├── getinfo.c │ │ ├── getinfo.h │ │ ├── gopher.c │ │ ├── gopher.h │ │ ├── hash.c │ │ ├── hash.h │ │ ├── hmac.c │ │ ├── hostasyn.c │ │ ├── hostcheck.c │ │ ├── hostcheck.h │ │ ├── hostip.c │ │ ├── hostip.h │ │ ├── hostip4.c │ │ ├── hostip6.c │ │ ├── hostsyn.c │ │ ├── http.c │ │ ├── http.h │ │ ├── http2.c │ │ ├── http2.h │ │ ├── http_chunks.c │ │ ├── http_chunks.h │ │ ├── http_digest.c │ │ ├── http_digest.h │ │ ├── http_negotiate.c │ │ ├── http_negotiate.h │ │ ├── http_ntlm.c │ │ ├── http_ntlm.h │ │ ├── http_proxy.c │ │ ├── http_proxy.h │ │ ├── idn_win32.c │ │ ├── if2ip.c │ │ ├── if2ip.h │ │ ├── imap.c │ │ ├── imap.h │ │ ├── inet_ntop.c │ │ ├── inet_ntop.h │ │ ├── inet_pton.c │ │ ├── inet_pton.h │ │ ├── krb5.c │ │ ├── ldap.c │ │ ├── libcurl.plist │ │ ├── libcurl.rc │ │ ├── libcurl.vers.in │ │ ├── llist.c │ │ ├── llist.h │ │ ├── makefile.amiga │ │ ├── makefile.dj │ │ ├── md4.c │ │ ├── md5.c │ │ ├── memdebug.c │ │ ├── memdebug.h │ │ ├── mime.c │ │ ├── mime.h │ │ ├── mk-ca-bundle.pl │ │ ├── mk-ca-bundle.vbs │ │ ├── mprintf.c │ │ ├── multi.c │ │ ├── multihandle.h │ │ ├── multiif.h │ │ ├── netrc.c │ │ ├── netrc.h │ │ ├── non-ascii.c │ │ ├── non-ascii.h │ │ ├── nonblock.c │ │ ├── nonblock.h │ │ ├── nwlib.c │ │ ├── nwos.c │ │ ├── objnames-test08.sh │ │ ├── objnames-test10.sh │ │ ├── objnames.inc │ │ ├── openldap.c │ │ ├── parsedate.c │ │ ├── parsedate.h │ │ ├── pingpong.c │ │ ├── pingpong.h │ │ ├── pipeline.c │ │ ├── pipeline.h │ │ ├── pop3.c │ │ ├── pop3.h │ │ ├── progress.c │ │ ├── progress.h │ │ ├── rand.c │ │ ├── rand.h │ │ ├── rtsp.c │ │ ├── rtsp.h │ │ ├── security.c │ │ ├── select.c │ │ ├── select.h │ │ ├── sendf.c │ │ ├── sendf.h │ │ ├── setopt.c │ │ ├── setopt.h │ │ ├── setup-os400.h │ │ ├── setup-vms.h │ │ ├── sha256.c │ │ ├── share.c │ │ ├── share.h │ │ ├── sigpipe.h │ │ ├── slist.c │ │ ├── slist.h │ │ ├── smb.c │ │ ├── smb.h │ │ ├── smtp.c │ │ ├── smtp.h │ │ ├── sockaddr.h │ │ ├── socks.c │ │ ├── socks.h │ │ ├── socks_gssapi.c │ │ ├── socks_sspi.c │ │ ├── speedcheck.c │ │ ├── speedcheck.h │ │ ├── splay.c │ │ ├── splay.h │ │ ├── ssh-libssh.c │ │ ├── ssh.c │ │ ├── ssh.h │ │ ├── strcase.c │ │ ├── strcase.h │ │ ├── strdup.c │ │ ├── strdup.h │ │ ├── strerror.c │ │ ├── strerror.h │ │ ├── strtok.c │ │ ├── strtok.h │ │ ├── strtoofft.c │ │ ├── strtoofft.h │ │ ├── system_win32.c │ │ ├── system_win32.h │ │ ├── telnet.c │ │ ├── telnet.h │ │ ├── tftp.c │ │ ├── tftp.h │ │ ├── timeval.c │ │ ├── timeval.h │ │ ├── transfer.c │ │ ├── transfer.h │ │ ├── url.c │ │ ├── url.h │ │ ├── urldata.h │ │ ├── vauth │ │ │ ├── cleartext.c │ │ │ ├── cram.c │ │ │ ├── digest.c │ │ │ ├── digest.h │ │ │ ├── digest_sspi.c │ │ │ ├── krb5_gssapi.c │ │ │ ├── krb5_sspi.c │ │ │ ├── ntlm.c │ │ │ ├── ntlm.h │ │ │ ├── ntlm_sspi.c │ │ │ ├── oauth2.c │ │ │ ├── spnego_gssapi.c │ │ │ ├── spnego_sspi.c │ │ │ ├── vauth.c │ │ │ └── vauth.h │ │ ├── version.c │ │ ├── vtls │ │ │ ├── axtls.c │ │ │ ├── axtls.h │ │ │ ├── cyassl.c │ │ │ ├── cyassl.h │ │ │ ├── darwinssl.c │ │ │ ├── darwinssl.h │ │ │ ├── gskit.c │ │ │ ├── gskit.h │ │ │ ├── gtls.c │ │ │ ├── gtls.h │ │ │ ├── mbedtls.c │ │ │ ├── mbedtls.h │ │ │ ├── nss.c │ │ │ ├── nssg.h │ │ │ ├── openssl.c │ │ │ ├── openssl.h │ │ │ ├── polarssl.c │ │ │ ├── polarssl.h │ │ │ ├── polarssl_threadlock.c │ │ │ ├── polarssl_threadlock.h │ │ │ ├── schannel.c │ │ │ ├── schannel.h │ │ │ ├── vtls.c │ │ │ └── vtls.h │ │ ├── warnless.c │ │ ├── warnless.h │ │ ├── wildcard.c │ │ ├── wildcard.h │ │ ├── x509asn1.c │ │ └── x509asn1.h │ └── loboris.ihostfull.com.crt ├── libssh2 │ ├── component.mk │ ├── include │ │ ├── libssh2.h │ │ ├── libssh2_publickey.h │ │ └── libssh2_sftp.h │ └── src │ │ ├── CMakeLists.txt │ │ ├── Makefile.am │ │ ├── NMakefile │ │ ├── agent.c │ │ ├── channel.c │ │ ├── channel.h │ │ ├── comp.c │ │ ├── comp.h │ │ ├── crypt.c │ │ ├── crypto.h │ │ ├── global.c │ │ ├── hostkey.c │ │ ├── keepalive.c │ │ ├── kex.c │ │ ├── knownhost.c │ │ ├── libgcrypt.c │ │ ├── libgcrypt.h │ │ ├── libssh2.pc.in │ │ ├── libssh2_config.h │ │ ├── libssh2_config_cmake.h.in │ │ ├── libssh2_priv.h │ │ ├── mac.c │ │ ├── mac.h │ │ ├── mbedtls.c │ │ ├── mbedtls.h │ │ ├── misc.c │ │ ├── misc.h │ │ ├── openssl.c │ │ ├── openssl.h │ │ ├── os400qc3.c │ │ ├── os400qc3.h │ │ ├── packet.c │ │ ├── packet.h │ │ ├── pem.c │ │ ├── publickey.c │ │ ├── scp.c │ │ ├── session.c │ │ ├── session.h │ │ ├── sftp.c │ │ ├── sftp.h │ │ ├── transport.c │ │ ├── transport.h │ │ ├── userauth.c │ │ ├── userauth.h │ │ ├── version.c │ │ ├── wincng.c │ │ └── wincng.h ├── pppos │ ├── component.mk │ ├── libGSM.c │ └── libGSM.h ├── quickmail │ ├── component.mk │ ├── quickmail.c │ └── quickmail.h └── zlib │ ├── adler32.c │ ├── component.mk │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── main ├── Kconfig.projbuild ├── component.mk ├── espcurl.c ├── espcurl.h └── testCurl.c ├── partitions_example.csv └── sdkconfig.defaults /.gitignore: -------------------------------------------------------------------------------- 1 | .config 2 | *.o 3 | *.pyc 4 | *.a 5 | *.d 6 | 7 | # gtags 8 | GTAGS 9 | GRTAGS 10 | GPATH 11 | 12 | # emacs 13 | .dir-locals.el 14 | 15 | # emacs temp file suffixes 16 | *~ 17 | .#* 18 | \#*# 19 | 20 | sdkconfig 21 | sdkconfig.old 22 | sdkconfig.lobo 23 | .cproject 24 | .project 25 | BUILD 26 | 27 | .settings/ 28 | 29 | build/ 30 | temp/ 31 | *.dis 32 | *.elf 33 | *.map 34 | **/.DS_Store 35 | -------------------------------------------------------------------------------- /Documents/everything-curl.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loboris/ESP32_curl_example/2916c5b2da33924eccff7f93b34febb7d965816b/Documents/everything-curl.pdf -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := testCurl 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /components/curl/README.md: -------------------------------------------------------------------------------- 1 | Used with **esp-idf**, **libcurl** needs some paches. 2 | 3 | The problem with **Connection already in progress** is caused by the fact that the lwip sockets starts at `LWIP_SOCKET_OFFSET`. 4 | 5 | `FD_SET`/`FD_GET` macros take this into account when operating on fd sets: `LWIP_SOCKET_OFFSET` is subtracted from fd number, and the resulting value as used as bit offset in fd set. 6 | 7 | In curl (file lib/select.h), the macro `#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))` checks the valid socket and fails with esp-idf lwip socket. 8 | 9 | This macro has to be changed to: 10 | 11 | `#define VALID_SOCK(s) (((s) - LWIP_SOCKET_OFFSET >= 0) && ((s) - LWIP_SOCKET_OFFSET < FD_SETSIZE))` 12 | 13 | then everything works as expected. 14 | 15 | Only directories **lib** and **include** from curl repository needs to be used. 16 | 17 | -------------------------------------------------------------------------------- /components/curl/ca-certificates.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID9TCCAt2gAwIBAgIJAMFss7E3vxJQMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYD 3 | VQQGEwJIUjEQMA4GA1UECAwHQ3JvYXRpYTEPMA0GA1UEBwwGWmFncmViMQ0wCwYD 4 | VQQKDARMb0JvMQ0wCwYDVQQLDARzb2Z0MR4wHAYDVQQDDBVsb2JvcmlzLmlob3N0 5 | ZnVsbC5jb20xIDAeBgkqhkiG9w0BCQEWEWxvYm9yaXNAZ21haWwuY29tMB4XDTE3 6 | MDUwMjE5MzcwMloXDTE4MDUwMjE5MzcwMlowgZAxCzAJBgNVBAYTAkhSMRAwDgYD 7 | VQQIDAdDcm9hdGlhMQ8wDQYDVQQHDAZaYWdyZWIxDTALBgNVBAoMBExvQm8xDTAL 8 | BgNVBAsMBHNvZnQxHjAcBgNVBAMMFWxvYm9yaXMuaWhvc3RmdWxsLmNvbTEgMB4G 9 | CSqGSIb3DQEJARYRbG9ib3Jpc0BnbWFpbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA 10 | A4IBDwAwggEKAoIBAQC5UmicYX09i1ZTuzKkpgHcaaIEUdEcFOTuK6IO54PYmOUp 11 | Z4AhRSO9P7EhKPUmHD9r/2YsljHQfUKFxNhc/dzgbZRtkntSENUXSjNdy0y2yTts 12 | 8Dzd0zf9LQ7tp5x/3zlg4zPD2Fk2747PIJWoyDynTc3XIg2xO/KPSMQDwwmIgaP1 13 | yB1tgDLexxIDtGIWzG1zq5+37OadmP8hWmvAaKLFTaC9U630mMio5UjuWCOPx5gu 14 | NLRy+riYHossgdvc1OBegZYFMGXoiwrR7tMjmW91cJWzYLEyVOYZYcssKsN3369j 15 | mNiqadYxjUuvZQQLWuwVoD9jtW42eZ4qxdfxmvZ/AgMBAAGjUDBOMB0GA1UdDgQW 16 | BBSs42xPlQ0awxtFlpPHy5woAbBDOTAfBgNVHSMEGDAWgBSs42xPlQ0awxtFlpPH 17 | y5woAbBDOTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAkhpCdqAdZ 18 | y1BX6dBj9nO2kwaZxXfjwOtftcXdloN6zPChqzjJNYv8z8DCvt6IWFqmB4AFRI6o 19 | 32MXBrbbVEqmPwqhk5fMQrf895l5uG9WkzyFY2GO95Vf2jr3uRBMEIAVjHdHRBLo 20 | 77OkLcHVaqWvBvanrGWp5Ig/l/B//VUHjudKk2bMlLpP3pT1AaLtkPn4899IqnJe 21 | lSiy7TcWIRZoyUneoKY0xMkBcvHrB2R/Z/Z2k1Fsze0gd9+Q61OntSch8DxXCTvz 22 | xy8Vs2RmZ372NY8XIqWV2ubNQrEr0pBrr00tbWPG2Jb1CP5QR4dim4vZSMHfyfUS 23 | WcRpb0q5na63 24 | -----END CERTIFICATE----- 25 | -------------------------------------------------------------------------------- /components/curl/component.mk: -------------------------------------------------------------------------------- 1 | COMPONENT_SRCDIRS:=lib lib/vauth lib/vtls 2 | COMPONENT_PRIV_INCLUDEDIRS:=lib include 3 | CFLAGS+=-DHAVE_CONFIG_H -DBUILDING_LIBCURL -------------------------------------------------------------------------------- /components/curl/esp32_curl_paches.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loboris/ESP32_curl_example/2916c5b2da33924eccff7f93b34febb7d965816b/components/curl/esp32_curl_paches.zip -------------------------------------------------------------------------------- /components/curl/include/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = curl 2 | 3 | EXTRA_DIST = README 4 | 5 | AUTOMAKE_OPTIONS = foreign no-dependencies 6 | -------------------------------------------------------------------------------- /components/curl/include/README: -------------------------------------------------------------------------------- 1 | _ _ ____ _ 2 | ___| | | | _ \| | 3 | / __| | | | |_) | | 4 | | (__| |_| | _ <| |___ 5 | \___|\___/|_| \_\_____| 6 | 7 | Include files for libcurl, external users. 8 | 9 | They're all placed in the curl subdirectory here for better fit in any kind 10 | of environment. You must include files from here using... 11 | 12 | #include 13 | 14 | ... style and point the compiler's include path to the directory holding the 15 | curl subdirectory. It makes it more likely to survive future modifications. 16 | 17 | NOTE FOR LIBCURL HACKERS 18 | 19 | * If you check out from git on a non-configure platform, you must run the 20 | appropriate buildconf* script to set up files before being able of compiling 21 | the library. 22 | 23 | * We cannot assume anything else but very basic compiler features being 24 | present. While libcurl requires an ANSI C compiler to build, some of the 25 | earlier ANSI compilers clearly can't deal with some preprocessor operators. 26 | 27 | * Newlines must remain unix-style for older compilers' sake. 28 | 29 | * Comments must be written in the old-style /* unnested C-fashion */ 30 | 31 | To figure out how to do good and portable checks for features, operating 32 | systems or specific hardwarare, a very good resource is Bjorn Reese's 33 | collection at https://sourceforge.net/p/predef/wiki/ 34 | -------------------------------------------------------------------------------- /components/curl/include/curl/.gitignore: -------------------------------------------------------------------------------- 1 | curlver.h.dist 2 | stamp-h2 3 | stamp-h3 4 | -------------------------------------------------------------------------------- /components/curl/include/curl/Makefile.am: -------------------------------------------------------------------------------- 1 | #*************************************************************************** 2 | # _ _ ____ _ 3 | # Project ___| | | | _ \| | 4 | # / __| | | | |_) | | 5 | # | (__| |_| | _ <| |___ 6 | # \___|\___/|_| \_\_____| 7 | # 8 | # Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 9 | # 10 | # This software is licensed as described in the file COPYING, which 11 | # you should have received as part of this distribution. The terms 12 | # are also available at https://curl.haxx.se/docs/copyright.html. 13 | # 14 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | # copies of the Software, and permit persons to whom the Software is 16 | # furnished to do so, under the terms of the COPYING file. 17 | # 18 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | # KIND, either express or implied. 20 | # 21 | ########################################################################### 22 | pkginclude_HEADERS = \ 23 | curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \ 24 | typecheck-gcc.h system.h 25 | 26 | pkgincludedir= $(includedir)/curl 27 | 28 | checksrc: 29 | @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) 30 | 31 | if CURLDEBUG 32 | # for debug builds, we scan the sources on all regular make invokes 33 | all-local: checksrc 34 | endif 35 | -------------------------------------------------------------------------------- /components/curl/include/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURL_MPRINTF_H 2 | #define __CURL_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include /* needed for FILE */ 27 | #include "curl.h" /* for CURL_EXTERN */ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | CURL_EXTERN int curl_mprintf(const char *format, ...); 34 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 35 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 36 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 37 | const char *format, ...); 38 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 39 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 40 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 41 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 42 | const char *format, va_list args); 43 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 44 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* __CURL_MPRINTF_H */ 51 | -------------------------------------------------------------------------------- /components/curl/include/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDC_HEADERS_H 2 | #define __STDC_HEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread(void *, size_t, size_t, FILE *); 28 | size_t fwrite(const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* __STDC_HEADERS_H */ 34 | -------------------------------------------------------------------------------- /components/curl/lib/.gitattributes: -------------------------------------------------------------------------------- 1 | objnames.inc eol=lf 2 | -------------------------------------------------------------------------------- /components/curl/lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.imp 3 | *.nlm 4 | *.orig 5 | *.rej 6 | *.res 7 | TAGS 8 | curl_config.h 9 | curl_config.h.in 10 | libcurl.plist.dist 11 | libcurl.vers 12 | stamp-h1 13 | -------------------------------------------------------------------------------- /components/curl/lib/amigaos.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #if defined(__AMIGA__) && !defined(__ixemul__) 26 | 27 | #include 28 | 29 | #include "amigaos.h" 30 | 31 | struct Library *SocketBase = NULL; 32 | extern int errno, h_errno; 33 | 34 | #ifdef __libnix__ 35 | #include 36 | void __request(const char *msg); 37 | #else 38 | # define __request(msg) Printf(msg "\n\a") 39 | #endif 40 | 41 | void Curl_amiga_cleanup() 42 | { 43 | if(SocketBase) { 44 | CloseLibrary(SocketBase); 45 | SocketBase = NULL; 46 | } 47 | } 48 | 49 | bool Curl_amiga_init() 50 | { 51 | if(!SocketBase) 52 | SocketBase = OpenLibrary("bsdsocket.library", 4); 53 | 54 | if(!SocketBase) { 55 | __request("No TCP/IP Stack running!"); 56 | return FALSE; 57 | } 58 | 59 | if(SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno, 60 | SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG) "curl", 61 | TAG_DONE)) { 62 | __request("SocketBaseTags ERROR"); 63 | return FALSE; 64 | } 65 | 66 | #ifndef __libnix__ 67 | atexit(Curl_amiga_cleanup); 68 | #endif 69 | 70 | return TRUE; 71 | } 72 | 73 | #ifdef __libnix__ 74 | ADD2EXIT(Curl_amiga_cleanup, -50); 75 | #endif 76 | 77 | #endif /* __AMIGA__ && ! __ixemul__ */ 78 | -------------------------------------------------------------------------------- /components/curl/lib/amigaos.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_AMIGAOS_H 2 | #define HEADER_CURL_AMIGAOS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #if defined(__AMIGA__) && !defined(__ixemul__) 27 | 28 | bool Curl_amiga_init(); 29 | void Curl_amiga_cleanup(); 30 | 31 | #else 32 | 33 | #define Curl_amiga_init() 1 34 | #define Curl_amiga_cleanup() Curl_nop_stmt 35 | 36 | #endif 37 | 38 | #endif /* HEADER_CURL_AMIGAOS_H */ 39 | 40 | -------------------------------------------------------------------------------- /components/curl/lib/content_encoding.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_CONTENT_ENCODING_H 2 | #define HEADER_CURL_CONTENT_ENCODING_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | /* Decoding writer. */ 27 | typedef struct contenc_writer_s contenc_writer; 28 | typedef struct content_encoding_s content_encoding; 29 | 30 | struct contenc_writer_s { 31 | const content_encoding *handler; /* Encoding handler. */ 32 | contenc_writer *downstream; /* Downstream writer. */ 33 | void *params; /* Encoding-specific storage (variable length). */ 34 | }; 35 | 36 | /* Content encoding writer. */ 37 | struct content_encoding_s { 38 | const char *name; /* Encoding name. */ 39 | const char *alias; /* Encoding name alias. */ 40 | CURLcode (*init_writer)(struct connectdata *conn, contenc_writer *writer); 41 | CURLcode (*unencode_write)(struct connectdata *conn, contenc_writer *writer, 42 | const char *buf, size_t nbytes); 43 | void (*close_writer)(struct connectdata *conn, contenc_writer *writer); 44 | size_t paramsize; 45 | }; 46 | 47 | 48 | CURLcode Curl_build_unencoding_stack(struct connectdata *conn, 49 | const char *enclist, int maybechunked); 50 | CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer, 51 | const char *buf, size_t nbytes); 52 | void Curl_unencode_cleanup(struct connectdata *conn); 53 | char *Curl_all_content_encodings(void); 54 | 55 | #endif /* HEADER_CURL_CONTENT_ENCODING_H */ 56 | -------------------------------------------------------------------------------- /components/curl/lib/cookie.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loboris/ESP32_curl_example/2916c5b2da33924eccff7f93b34febb7d965816b/components/curl/lib/cookie.c -------------------------------------------------------------------------------- /components/curl/lib/curl_base64.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_BASE64_H 2 | #define HEADER_CURL_BASE64_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | CURLcode Curl_base64_encode(struct Curl_easy *data, 26 | const char *inputbuff, size_t insize, 27 | char **outptr, size_t *outlen); 28 | CURLcode Curl_base64url_encode(struct Curl_easy *data, 29 | const char *inputbuff, size_t insize, 30 | char **outptr, size_t *outlen); 31 | 32 | CURLcode Curl_base64_decode(const char *src, 33 | unsigned char **outptr, size_t *outlen); 34 | 35 | #endif /* HEADER_CURL_BASE64_H */ 36 | -------------------------------------------------------------------------------- /components/curl/lib/curl_des.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 2015, Steve Holme, . 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #if defined(USE_NTLM) && !defined(USE_OPENSSL) 26 | 27 | #include "curl_des.h" 28 | 29 | /* 30 | * Curl_des_set_odd_parity() 31 | * 32 | * This is used to apply odd parity to the given byte array. It is typically 33 | * used by when a cryptography engines doesn't have it's own version. 34 | * 35 | * The function is a port of the Java based oddParity() function over at: 36 | * 37 | * https://davenport.sourceforge.io/ntlm.html 38 | * 39 | * Parameters: 40 | * 41 | * bytes [in/out] - The data whose parity bits are to be adjusted for 42 | * odd parity. 43 | * len [out] - The length of the data. 44 | */ 45 | void Curl_des_set_odd_parity(unsigned char *bytes, size_t len) 46 | { 47 | size_t i; 48 | 49 | for(i = 0; i < len; i++) { 50 | unsigned char b = bytes[i]; 51 | 52 | bool needs_parity = (((b >> 7) ^ (b >> 6) ^ (b >> 5) ^ 53 | (b >> 4) ^ (b >> 3) ^ (b >> 2) ^ 54 | (b >> 1)) & 0x01) == 0; 55 | 56 | if(needs_parity) 57 | bytes[i] |= 0x01; 58 | else 59 | bytes[i] &= 0xfe; 60 | } 61 | } 62 | 63 | #endif /* USE_NTLM && !USE_OPENSSL */ 64 | -------------------------------------------------------------------------------- /components/curl/lib/curl_des.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_DES_H 2 | #define HEADER_CURL_DES_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2015, Steve Holme, . 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if defined(USE_NTLM) && !defined(USE_OPENSSL) 28 | 29 | /* Applies odd parity to the given byte array */ 30 | void Curl_des_set_odd_parity(unsigned char *bytes, size_t length); 31 | 32 | #endif /* USE_NTLM && !USE_OPENSSL */ 33 | 34 | #endif /* HEADER_CURL_DES_H */ 35 | -------------------------------------------------------------------------------- /components/curl/lib/curl_endian.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_ENDIAN_H 2 | #define HEADER_CURL_ENDIAN_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* Converts a 16-bit integer from little endian */ 26 | unsigned short Curl_read16_le(const unsigned char *buf); 27 | 28 | /* Converts a 32-bit integer from little endian */ 29 | unsigned int Curl_read32_le(const unsigned char *buf); 30 | 31 | /* Converts a 16-bit integer from big endian */ 32 | unsigned short Curl_read16_be(const unsigned char *buf); 33 | 34 | /* Converts a 32-bit integer to little endian */ 35 | void Curl_write32_le(const int value, unsigned char *buffer); 36 | 37 | #if (CURL_SIZEOF_CURL_OFF_T > 4) 38 | /* Converts a 64-bit integer to little endian */ 39 | #if defined(HAVE_LONGLONG) 40 | void Curl_write64_le(const long long value, unsigned char *buffer); 41 | #else 42 | void Curl_write64_le(const __int64 value, unsigned char *buffer); 43 | #endif 44 | #endif 45 | 46 | #endif /* HEADER_CURL_ENDIAN_H */ 47 | -------------------------------------------------------------------------------- /components/curl/lib/curl_fnmatch.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_FNMATCH_H 2 | #define HEADER_CURL_FNMATCH_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #define CURL_FNMATCH_MATCH 0 26 | #define CURL_FNMATCH_NOMATCH 1 27 | #define CURL_FNMATCH_FAIL 2 28 | 29 | /* default pattern matching function 30 | * ================================= 31 | * Implemented with recursive backtracking, if you want to use Curl_fnmatch, 32 | * please note that there is not implemented UTF/UNICODE support. 33 | * 34 | * Implemented features: 35 | * '?' notation, does not match UTF characters 36 | * '*' can also work with UTF string 37 | * [a-zA-Z0-9] enumeration support 38 | * 39 | * keywords: alnum, digit, xdigit, alpha, print, blank, lower, graph, space 40 | * and upper (use as "[[:alnum:]]") 41 | */ 42 | int Curl_fnmatch(void *ptr, const char *pattern, const char *string); 43 | 44 | #endif /* HEADER_CURL_FNMATCH_H */ 45 | -------------------------------------------------------------------------------- /components/curl/lib/curl_gethostname.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GETHOSTNAME_H 2 | #define HEADER_CURL_GETHOSTNAME_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* Hostname buffer size */ 26 | #define HOSTNAME_MAX 1024 27 | 28 | /* This returns the local machine's un-qualified hostname */ 29 | int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen); 30 | 31 | #endif /* HEADER_CURL_GETHOSTNAME_H */ 32 | -------------------------------------------------------------------------------- /components/curl/lib/curl_gssapi.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GSSAPI_H 2 | #define HEADER_CURL_GSSAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2011 - 2015, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | #include "urldata.h" 27 | 28 | #ifdef HAVE_GSSAPI 29 | 30 | #ifdef HAVE_GSSGNU 31 | # include 32 | #elif defined HAVE_GSSMIT 33 | /* MIT style */ 34 | # include 35 | # include 36 | # include 37 | #else 38 | /* Heimdal-style */ 39 | # include 40 | #endif 41 | 42 | extern gss_OID_desc Curl_spnego_mech_oid; 43 | extern gss_OID_desc Curl_krb5_mech_oid; 44 | 45 | /* Common method for using GSS-API */ 46 | OM_uint32 Curl_gss_init_sec_context( 47 | struct Curl_easy *data, 48 | OM_uint32 *minor_status, 49 | gss_ctx_id_t *context, 50 | gss_name_t target_name, 51 | gss_OID mech_type, 52 | gss_channel_bindings_t input_chan_bindings, 53 | gss_buffer_t input_token, 54 | gss_buffer_t output_token, 55 | const bool mutual_auth, 56 | OM_uint32 *ret_flags); 57 | 58 | /* Helper to log a GSS-API error status */ 59 | void Curl_gss_log_error(struct Curl_easy *data, const char *prefix, 60 | OM_uint32 major, OM_uint32 minor); 61 | 62 | /* Provide some definitions missing in old headers */ 63 | #ifdef HAVE_OLD_GSSMIT 64 | #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name 65 | #define NCOMPAT 1 66 | #endif 67 | 68 | /* Define our privacy and integrity protection values */ 69 | #define GSSAUTH_P_NONE 1 70 | #define GSSAUTH_P_INTEGRITY 2 71 | #define GSSAUTH_P_PRIVACY 4 72 | 73 | #endif /* HAVE_GSSAPI */ 74 | 75 | #endif /* HEADER_CURL_GSSAPI_H */ 76 | -------------------------------------------------------------------------------- /components/curl/lib/curl_hmac.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_HMAC_H 2 | #define HEADER_CURL_HMAC_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifndef CURL_DISABLE_CRYPTO_AUTH 26 | 27 | typedef void (* HMAC_hinit_func)(void *context); 28 | typedef void (* HMAC_hupdate_func)(void *context, 29 | const unsigned char *data, 30 | unsigned int len); 31 | typedef void (* HMAC_hfinal_func)(unsigned char *result, void *context); 32 | 33 | 34 | /* Per-hash function HMAC parameters. */ 35 | 36 | typedef struct { 37 | HMAC_hinit_func hmac_hinit; /* Initialize context procedure. */ 38 | HMAC_hupdate_func hmac_hupdate; /* Update context with data. */ 39 | HMAC_hfinal_func hmac_hfinal; /* Get final result procedure. */ 40 | unsigned int hmac_ctxtsize; /* Context structure size. */ 41 | unsigned int hmac_maxkeylen; /* Maximum key length (bytes). */ 42 | unsigned int hmac_resultlen; /* Result length (bytes). */ 43 | } HMAC_params; 44 | 45 | 46 | /* HMAC computation context. */ 47 | 48 | typedef struct { 49 | const HMAC_params *hmac_hash; /* Hash function definition. */ 50 | void *hmac_hashctxt1; /* Hash function context 1. */ 51 | void *hmac_hashctxt2; /* Hash function context 2. */ 52 | } HMAC_context; 53 | 54 | 55 | /* Prototypes. */ 56 | 57 | HMAC_context * Curl_HMAC_init(const HMAC_params *hashparams, 58 | const unsigned char *key, 59 | unsigned int keylen); 60 | int Curl_HMAC_update(HMAC_context *context, 61 | const unsigned char *data, 62 | unsigned int len); 63 | int Curl_HMAC_final(HMAC_context *context, unsigned char *result); 64 | 65 | #endif 66 | 67 | #endif /* HEADER_CURL_HMAC_H */ 68 | -------------------------------------------------------------------------------- /components/curl/lib/curl_ldap.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_LDAP_H 2 | #define HEADER_CURL_LDAP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifndef CURL_DISABLE_LDAP 25 | extern const struct Curl_handler Curl_handler_ldap; 26 | 27 | #if !defined(CURL_DISABLE_LDAPS) && \ 28 | ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \ 29 | (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))) 30 | extern const struct Curl_handler Curl_handler_ldaps; 31 | #endif 32 | 33 | #endif 34 | #endif /* HEADER_CURL_LDAP_H */ 35 | 36 | -------------------------------------------------------------------------------- /components/curl/lib/curl_md4.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_MD4_H 2 | #define HEADER_CURL_MD4_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ 28 | (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) 29 | 30 | void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len); 31 | 32 | #endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) || 33 | (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */ 34 | 35 | #endif /* HEADER_CURL_MD4_H */ 36 | -------------------------------------------------------------------------------- /components/curl/lib/curl_md5.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_MD5_H 2 | #define HEADER_CURL_MD5_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifndef CURL_DISABLE_CRYPTO_AUTH 26 | #include "curl_hmac.h" 27 | 28 | #define MD5_DIGEST_LEN 16 29 | 30 | typedef void (* Curl_MD5_init_func)(void *context); 31 | typedef void (* Curl_MD5_update_func)(void *context, 32 | const unsigned char *data, 33 | unsigned int len); 34 | typedef void (* Curl_MD5_final_func)(unsigned char *result, void *context); 35 | 36 | typedef struct { 37 | Curl_MD5_init_func md5_init_func; /* Initialize context procedure */ 38 | Curl_MD5_update_func md5_update_func; /* Update context with data */ 39 | Curl_MD5_final_func md5_final_func; /* Get final result procedure */ 40 | unsigned int md5_ctxtsize; /* Context structure size */ 41 | unsigned int md5_resultlen; /* Result length (bytes) */ 42 | } MD5_params; 43 | 44 | typedef struct { 45 | const MD5_params *md5_hash; /* Hash function definition */ 46 | void *md5_hashctx; /* Hash function context */ 47 | } MD5_context; 48 | 49 | extern const MD5_params Curl_DIGEST_MD5[1]; 50 | extern const HMAC_params Curl_HMAC_MD5[1]; 51 | 52 | void Curl_md5it(unsigned char *output, 53 | const unsigned char *input); 54 | 55 | MD5_context * Curl_MD5_init(const MD5_params *md5params); 56 | int Curl_MD5_update(MD5_context *context, 57 | const unsigned char *data, 58 | unsigned int len); 59 | int Curl_MD5_final(MD5_context *context, unsigned char *result); 60 | 61 | #endif 62 | 63 | #endif /* HEADER_CURL_MD5_H */ 64 | -------------------------------------------------------------------------------- /components/curl/lib/curl_memrchr.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include 26 | 27 | #include "curl_memrchr.h" 28 | #include "curl_memory.h" 29 | 30 | /* The last #include file should be: */ 31 | #include "memdebug.h" 32 | 33 | #ifndef HAVE_MEMRCHR 34 | 35 | /* 36 | * Curl_memrchr() 37 | * 38 | * Our memrchr() function clone for systems which lack this function. The 39 | * memrchr() function is like the memchr() function, except that it searches 40 | * backwards from the end of the n bytes pointed to by s instead of forward 41 | * from the beginning. 42 | */ 43 | 44 | void * 45 | Curl_memrchr(const void *s, int c, size_t n) 46 | { 47 | const unsigned char *p = s; 48 | const unsigned char *q = s; 49 | 50 | p += n - 1; 51 | 52 | while(p >= q) { 53 | if(*p == (unsigned char)c) 54 | return (void *)p; 55 | p--; 56 | } 57 | 58 | return NULL; 59 | } 60 | 61 | #endif /* HAVE_MEMRCHR */ 62 | -------------------------------------------------------------------------------- /components/curl/lib/curl_memrchr.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_MEMRCHR_H 2 | #define HEADER_CURL_MEMRCHR_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #ifdef HAVE_MEMRCHR 28 | 29 | #ifdef HAVE_STRING_H 30 | # include 31 | #endif 32 | #ifdef HAVE_STRINGS_H 33 | # include 34 | #endif 35 | 36 | #else /* HAVE_MEMRCHR */ 37 | 38 | void *Curl_memrchr(const void *s, int c, size_t n); 39 | 40 | #define memrchr(x,y,z) Curl_memrchr((x),(y),(z)) 41 | 42 | #endif /* HAVE_MEMRCHR */ 43 | 44 | #endif /* HEADER_CURL_MEMRCHR_H */ 45 | -------------------------------------------------------------------------------- /components/curl/lib/curl_multibyte.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include 26 | 27 | #if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \ 28 | defined(USE_WIN32_LDAP)) && defined(UNICODE)) 29 | 30 | /* 31 | * MultiByte conversions using Windows kernel32 library. 32 | */ 33 | 34 | #include "curl_multibyte.h" 35 | #include "curl_memory.h" 36 | 37 | /* The last #include file should be: */ 38 | #include "memdebug.h" 39 | 40 | wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8) 41 | { 42 | wchar_t *str_w = NULL; 43 | 44 | if(str_utf8) { 45 | int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, 46 | str_utf8, -1, NULL, 0); 47 | if(str_w_len > 0) { 48 | str_w = malloc(str_w_len * sizeof(wchar_t)); 49 | if(str_w) { 50 | if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w, 51 | str_w_len) == 0) { 52 | free(str_w); 53 | return NULL; 54 | } 55 | } 56 | } 57 | } 58 | 59 | return str_w; 60 | } 61 | 62 | char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w) 63 | { 64 | char *str_utf8 = NULL; 65 | 66 | if(str_w) { 67 | int str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL, 68 | 0, NULL, NULL); 69 | if(str_utf8_len > 0) { 70 | str_utf8 = malloc(str_utf8_len * sizeof(wchar_t)); 71 | if(str_utf8) { 72 | if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len, 73 | NULL, FALSE) == 0) { 74 | free(str_utf8); 75 | return NULL; 76 | } 77 | } 78 | } 79 | } 80 | 81 | return str_utf8; 82 | } 83 | 84 | #endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */ 85 | -------------------------------------------------------------------------------- /components/curl/lib/curl_ntlm_wb.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NTLM_WB_H 2 | #define HEADER_CURL_NTLM_WB_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ 28 | defined(NTLM_WB_ENABLED) 29 | 30 | /* this is for creating ntlm header output by delegating challenge/response 31 | to Samba's winbind daemon helper ntlm_auth */ 32 | CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy); 33 | 34 | void Curl_ntlm_wb_cleanup(struct connectdata *conn); 35 | 36 | #endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */ 37 | 38 | #endif /* HEADER_CURL_NTLM_WB_H */ 39 | -------------------------------------------------------------------------------- /components/curl/lib/curl_path.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | #include 25 | #include "urldata.h" 26 | 27 | #ifdef WIN32 28 | # undef PATH_MAX 29 | # define PATH_MAX MAX_PATH 30 | # ifndef R_OK 31 | # define R_OK 4 32 | # endif 33 | #endif 34 | 35 | #ifndef PATH_MAX 36 | #define PATH_MAX 1024 /* just an extra precaution since there are systems that 37 | have their definition hidden well */ 38 | #endif 39 | 40 | CURLcode Curl_getworkingpath(struct connectdata *conn, 41 | char *homedir, 42 | char **path); 43 | 44 | CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir); 45 | -------------------------------------------------------------------------------- /components/curl/lib/curl_printf.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_PRINTF_H 2 | #define HEADER_CURL_PRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* 26 | * This header should be included by ALL code in libcurl that uses any 27 | * *rintf() functions. 28 | */ 29 | 30 | #include 31 | 32 | # undef printf 33 | # undef fprintf 34 | # undef snprintf 35 | # undef vprintf 36 | # undef vfprintf 37 | # undef vsnprintf 38 | # undef aprintf 39 | # undef vaprintf 40 | # define printf curl_mprintf 41 | # define fprintf curl_mfprintf 42 | # define snprintf curl_msnprintf 43 | # define vprintf curl_mvprintf 44 | # define vfprintf curl_mvfprintf 45 | # define vsnprintf curl_mvsnprintf 46 | # define aprintf curl_maprintf 47 | # define vaprintf curl_mvaprintf 48 | 49 | /* We define away the sprintf functions unconditonally since we don't want 50 | internal code to be using them, intentionally or by mistake!*/ 51 | # undef sprintf 52 | # undef vsprintf 53 | # define sprintf sprintf_was_used 54 | # define vsprintf vsprintf_was_used 55 | 56 | #endif /* HEADER_CURL_PRINTF_H */ 57 | -------------------------------------------------------------------------------- /components/curl/lib/curl_rtmp.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_RTMP_H 2 | #define HEADER_CURL_RTMP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2010, Howard Chu, 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifdef USE_LIBRTMP 25 | extern const struct Curl_handler Curl_handler_rtmp; 26 | extern const struct Curl_handler Curl_handler_rtmpt; 27 | extern const struct Curl_handler Curl_handler_rtmpe; 28 | extern const struct Curl_handler Curl_handler_rtmpte; 29 | extern const struct Curl_handler Curl_handler_rtmps; 30 | extern const struct Curl_handler Curl_handler_rtmpts; 31 | #endif 32 | 33 | #endif /* HEADER_CURL_RTMP_H */ 34 | -------------------------------------------------------------------------------- /components/curl/lib/curl_sec.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SECURITY_H 2 | #define HEADER_CURL_SECURITY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | struct Curl_sec_client_mech { 26 | const char *name; 27 | size_t size; 28 | int (*init)(void *); 29 | int (*auth)(void *, struct connectdata *); 30 | void (*end)(void *); 31 | int (*check_prot)(void *, int); 32 | int (*overhead)(void *, int, int); 33 | int (*encode)(void *, const void *, int, int, void **); 34 | int (*decode)(void *, void *, int, int, struct connectdata *); 35 | }; 36 | 37 | #define AUTH_OK 0 38 | #define AUTH_CONTINUE 1 39 | #define AUTH_ERROR 2 40 | 41 | #ifdef HAVE_GSSAPI 42 | int Curl_sec_read_msg(struct connectdata *conn, char *, 43 | enum protection_level); 44 | void Curl_sec_end(struct connectdata *); 45 | CURLcode Curl_sec_login(struct connectdata *); 46 | int Curl_sec_request_prot(struct connectdata *conn, const char *level); 47 | 48 | extern struct Curl_sec_client_mech Curl_krb5_client_mech; 49 | #endif 50 | 51 | #endif /* HEADER_CURL_SECURITY_H */ 52 | -------------------------------------------------------------------------------- /components/curl/lib/curl_sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SHA256_H 2 | #define HEADER_CURL_SHA256_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Florin Petriuc, 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifndef CURL_DISABLE_CRYPTO_AUTH 26 | 27 | void Curl_sha256it(unsigned char *outbuffer, 28 | const unsigned char *input); 29 | 30 | #endif 31 | 32 | #endif /* HEADER_CURL_SHA256_H */ 33 | -------------------------------------------------------------------------------- /components/curl/lib/curl_threads.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_THREADS_H 2 | #define HEADER_CURL_THREADS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #if defined(USE_THREADS_POSIX) 27 | # define CURL_STDCALL 28 | # define curl_mutex_t pthread_mutex_t 29 | # define curl_thread_t pthread_t * 30 | # define curl_thread_t_null (pthread_t *)0 31 | # define Curl_mutex_init(m) pthread_mutex_init(m, NULL) 32 | # define Curl_mutex_acquire(m) pthread_mutex_lock(m) 33 | # define Curl_mutex_release(m) pthread_mutex_unlock(m) 34 | # define Curl_mutex_destroy(m) pthread_mutex_destroy(m) 35 | #elif defined(USE_THREADS_WIN32) 36 | # define CURL_STDCALL __stdcall 37 | # define curl_mutex_t CRITICAL_SECTION 38 | # define curl_thread_t HANDLE 39 | # define curl_thread_t_null (HANDLE)0 40 | # if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ 41 | (_WIN32_WINNT < _WIN32_WINNT_VISTA) 42 | # define Curl_mutex_init(m) InitializeCriticalSection(m) 43 | # else 44 | # define Curl_mutex_init(m) InitializeCriticalSectionEx(m, 0, 1) 45 | # endif 46 | # define Curl_mutex_acquire(m) EnterCriticalSection(m) 47 | # define Curl_mutex_release(m) LeaveCriticalSection(m) 48 | # define Curl_mutex_destroy(m) DeleteCriticalSection(m) 49 | #endif 50 | 51 | #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) 52 | 53 | /* !checksrc! disable SPACEBEFOREPAREN 1 */ 54 | curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), 55 | void *arg); 56 | 57 | void Curl_thread_destroy(curl_thread_t hnd); 58 | 59 | int Curl_thread_join(curl_thread_t *hnd); 60 | 61 | #endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ 62 | 63 | #endif /* HEADER_CURL_THREADS_H */ 64 | -------------------------------------------------------------------------------- /components/curl/lib/dict.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_DICT_H 2 | #define HEADER_CURL_DICT_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifndef CURL_DISABLE_DICT 26 | extern const struct Curl_handler Curl_handler_dict; 27 | #endif 28 | 29 | #endif /* HEADER_CURL_DICT_H */ 30 | -------------------------------------------------------------------------------- /components/curl/lib/dotdot.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_DOTDOT_H 2 | #define HEADER_CURL_DOTDOT_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | char *Curl_dedotdotify(const char *input); 25 | #endif 26 | -------------------------------------------------------------------------------- /components/curl/lib/easyif.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_EASYIF_H 2 | #define HEADER_CURL_EASYIF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* 26 | * Prototypes for library-wide functions provided by easy.c 27 | */ 28 | #ifdef CURLDEBUG 29 | CURL_EXTERN CURLcode curl_easy_perform_ev(struct Curl_easy *easy); 30 | #endif 31 | 32 | #endif /* HEADER_CURL_EASYIF_H */ 33 | 34 | -------------------------------------------------------------------------------- /components/curl/lib/escape.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_ESCAPE_H 2 | #define HEADER_CURL_ESCAPE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | /* Escape and unescape URL encoding in strings. The functions return a new 25 | * allocated string or NULL if an error occurred. */ 26 | 27 | CURLcode Curl_urldecode(struct Curl_easy *data, 28 | const char *string, size_t length, 29 | char **ostring, size_t *olen, 30 | bool reject_crlf); 31 | 32 | #endif /* HEADER_CURL_ESCAPE_H */ 33 | 34 | -------------------------------------------------------------------------------- /components/curl/lib/file.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_FILE_H 2 | #define HEADER_CURL_FILE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | 26 | /**************************************************************************** 27 | * FILE unique setup 28 | ***************************************************************************/ 29 | struct FILEPROTO { 30 | char *path; /* the path we operate on */ 31 | char *freepath; /* pointer to the allocated block we must free, this might 32 | differ from the 'path' pointer */ 33 | int fd; /* open file descriptor to read from! */ 34 | }; 35 | 36 | #ifndef CURL_DISABLE_FILE 37 | extern const struct Curl_handler Curl_handler_file; 38 | #endif 39 | 40 | #endif /* HEADER_CURL_FILE_H */ 41 | 42 | -------------------------------------------------------------------------------- /components/curl/lib/fileinfo.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include "strdup.h" 26 | #include "fileinfo.h" 27 | #include "curl_memory.h" 28 | /* The last #include file should be: */ 29 | #include "memdebug.h" 30 | 31 | struct fileinfo *Curl_fileinfo_alloc(void) 32 | { 33 | return calloc(1, sizeof(struct fileinfo)); 34 | } 35 | 36 | void Curl_fileinfo_dtor(void *user, void *element) 37 | { 38 | struct fileinfo *finfo = element; 39 | (void) user; 40 | if(!finfo) 41 | return; 42 | 43 | Curl_safefree(finfo->info.b_data); 44 | 45 | free(finfo); 46 | } 47 | -------------------------------------------------------------------------------- /components/curl/lib/fileinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_FILEINFO_H 2 | #define HEADER_CURL_FILEINFO_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2010, 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include "llist.h" 27 | 28 | struct fileinfo { 29 | struct curl_fileinfo info; 30 | struct curl_llist_element list; 31 | }; 32 | 33 | struct fileinfo *Curl_fileinfo_alloc(void); 34 | 35 | void Curl_fileinfo_dtor(void *, void *); 36 | 37 | #endif /* HEADER_CURL_FILEINFO_H */ 38 | -------------------------------------------------------------------------------- /components/curl/lib/firefox-db2pem.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # *************************************************************************** 3 | # * _ _ ____ _ 4 | # * Project ___| | | | _ \| | 5 | # * / __| | | | |_) | | 6 | # * | (__| |_| | _ <| |___ 7 | # * \___|\___/|_| \_\_____| 8 | # * 9 | # * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 10 | # * 11 | # * This software is licensed as described in the file COPYING, which 12 | # * you should have received as part of this distribution. The terms 13 | # * are also available at https://curl.haxx.se/docs/copyright.html. 14 | # * 15 | # * You may opt to use, copy, modify, merge, publish, distribute and/or sell 16 | # * copies of the Software, and permit persons to whom the Software is 17 | # * furnished to do so, under the terms of the COPYING file. 18 | # * 19 | # * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 20 | # * KIND, either express or implied. 21 | # * 22 | # *************************************************************************** 23 | # This shell script creates a fresh ca-bundle.crt file for use with libcurl. 24 | # It extracts all ca certs it finds in the local Firefox database and converts 25 | # them all into PEM format. 26 | # 27 | db=`ls -1d $HOME/.mozilla/firefox/*default*` 28 | out=$1 29 | 30 | if test -z "$out"; then 31 | out="ca-bundle.crt" # use a sensible default 32 | fi 33 | 34 | currentdate=`date` 35 | 36 | cat >$out <> $out 54 | 55 | -------------------------------------------------------------------------------- /components/curl/lib/formdata.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_FORMDATA_H 2 | #define HEADER_CURL_FORMDATA_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* used by FormAdd for temporary storage */ 26 | typedef struct FormInfo { 27 | char *name; 28 | bool name_alloc; 29 | size_t namelength; 30 | char *value; 31 | bool value_alloc; 32 | curl_off_t contentslength; 33 | char *contenttype; 34 | bool contenttype_alloc; 35 | long flags; 36 | char *buffer; /* pointer to existing buffer used for file upload */ 37 | size_t bufferlength; 38 | char *showfilename; /* The file name to show. If not set, the actual 39 | file name will be used */ 40 | bool showfilename_alloc; 41 | char *userp; /* pointer for the read callback */ 42 | struct curl_slist *contentheader; 43 | struct FormInfo *more; 44 | } FormInfo; 45 | 46 | CURLcode Curl_getformdata(struct Curl_easy *data, 47 | curl_mimepart *, 48 | struct curl_httppost *post, 49 | curl_read_callback fread_func); 50 | 51 | #endif /* HEADER_CURL_FORMDATA_H */ 52 | -------------------------------------------------------------------------------- /components/curl/lib/ftplistparser.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_FTPLISTPARSER_H 2 | #define HEADER_CURL_FTPLISTPARSER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #ifndef CURL_DISABLE_FTP 27 | 28 | /* WRITEFUNCTION callback for parsing LIST responses */ 29 | size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, 30 | void *connptr); 31 | 32 | struct ftp_parselist_data; /* defined inside ftplibparser.c */ 33 | 34 | CURLcode Curl_ftp_parselist_geterror(struct ftp_parselist_data *pl_data); 35 | 36 | struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void); 37 | 38 | void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data); 39 | 40 | #endif /* CURL_DISABLE_FTP */ 41 | #endif /* HEADER_CURL_FTPLISTPARSER_H */ 42 | -------------------------------------------------------------------------------- /components/curl/lib/getenv.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include 26 | #include "curl_memory.h" 27 | 28 | #include "memdebug.h" 29 | 30 | static 31 | char *GetEnv(const char *variable) 32 | { 33 | #if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) 34 | (void)variable; 35 | return NULL; 36 | #else 37 | #ifdef WIN32 38 | char env[MAX_PATH]; /* MAX_PATH is from windef.h */ 39 | char *temp = getenv(variable); 40 | env[0] = '\0'; 41 | if(temp != NULL) 42 | ExpandEnvironmentStringsA(temp, env, sizeof(env)); 43 | return (env[0] != '\0')?strdup(env):NULL; 44 | #else 45 | char *env = getenv(variable); 46 | return (env && env[0])?strdup(env):NULL; 47 | #endif 48 | #endif 49 | } 50 | 51 | char *curl_getenv(const char *v) 52 | { 53 | return GetEnv(v); 54 | } 55 | -------------------------------------------------------------------------------- /components/curl/lib/getinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GETINFO_H 2 | #define HEADER_CURL_GETINFO_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...); 25 | CURLcode Curl_initinfo(struct Curl_easy *data); 26 | 27 | #endif /* HEADER_CURL_GETINFO_H */ 28 | -------------------------------------------------------------------------------- /components/curl/lib/gopher.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GOPHER_H 2 | #define HEADER_CURL_GOPHER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifndef CURL_DISABLE_GOPHER 26 | extern const struct Curl_handler Curl_handler_gopher; 27 | #endif 28 | 29 | #endif /* HEADER_CURL_GOPHER_H */ 30 | -------------------------------------------------------------------------------- /components/curl/lib/hostcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_HOSTCHECK_H 2 | #define HEADER_CURL_HOSTCHECK_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | #define CURL_HOST_NOMATCH 0 28 | #define CURL_HOST_MATCH 1 29 | int Curl_cert_hostcheck(const char *match_pattern, const char *hostname); 30 | 31 | #endif /* HEADER_CURL_HOSTCHECK_H */ 32 | 33 | -------------------------------------------------------------------------------- /components/curl/lib/http_digest.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_HTTP_DIGEST_H 2 | #define HEADER_CURL_HTTP_DIGEST_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | /* this is for digest header input */ 27 | CURLcode Curl_input_digest(struct connectdata *conn, 28 | bool proxy, const char *header); 29 | 30 | /* this is for creating digest header output */ 31 | CURLcode Curl_output_digest(struct connectdata *conn, 32 | bool proxy, 33 | const unsigned char *request, 34 | const unsigned char *uripath); 35 | 36 | #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) 37 | void Curl_digest_cleanup(struct Curl_easy *data); 38 | #else 39 | #define Curl_digest_cleanup(x) Curl_nop_stmt 40 | #endif 41 | 42 | #endif /* HEADER_CURL_HTTP_DIGEST_H */ 43 | -------------------------------------------------------------------------------- /components/curl/lib/http_negotiate.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_HTTP_NEGOTIATE_H 2 | #define HEADER_CURL_HTTP_NEGOTIATE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #ifdef USE_SPNEGO 26 | 27 | /* this is for Negotiate header input */ 28 | CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy, 29 | const char *header); 30 | 31 | /* this is for creating Negotiate header output */ 32 | CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy); 33 | 34 | void Curl_cleanup_negotiate(struct Curl_easy *data); 35 | 36 | #endif /* USE_SPNEGO */ 37 | 38 | #endif /* HEADER_CURL_HTTP_NEGOTIATE_H */ 39 | -------------------------------------------------------------------------------- /components/curl/lib/http_ntlm.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NTLM_H 2 | #define HEADER_CURL_NTLM_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) 28 | 29 | /* this is for ntlm header input */ 30 | CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy, 31 | const char *header); 32 | 33 | /* this is for creating ntlm header output */ 34 | CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy); 35 | 36 | void Curl_http_ntlm_cleanup(struct connectdata *conn); 37 | 38 | #endif /* !CURL_DISABLE_HTTP && USE_NTLM */ 39 | 40 | #endif /* HEADER_CURL_NTLM_H */ 41 | -------------------------------------------------------------------------------- /components/curl/lib/http_proxy.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_HTTP_PROXY_H 2 | #define HEADER_CURL_HTTP_PROXY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | #include "urldata.h" 27 | 28 | #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) 29 | /* ftp can use this as well */ 30 | CURLcode Curl_proxyCONNECT(struct connectdata *conn, 31 | int tunnelsocket, 32 | const char *hostname, int remote_port); 33 | 34 | /* Default proxy timeout in milliseconds */ 35 | #define PROXY_TIMEOUT (3600*1000) 36 | 37 | CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex); 38 | 39 | bool Curl_connect_complete(struct connectdata *conn); 40 | bool Curl_connect_ongoing(struct connectdata *conn); 41 | 42 | #else 43 | #define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN 44 | #define Curl_proxy_connect(x,y) CURLE_OK 45 | #define Curl_connect_complete(x) CURLE_OK 46 | #define Curl_connect_ongoing(x) FALSE 47 | #endif 48 | 49 | void Curl_connect_free(struct Curl_easy *data); 50 | 51 | #endif /* HEADER_CURL_HTTP_PROXY_H */ 52 | -------------------------------------------------------------------------------- /components/curl/lib/inet_ntop.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_INET_NTOP_H 2 | #define HEADER_CURL_INET_NTOP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); 28 | 29 | #ifdef HAVE_INET_NTOP 30 | #ifdef HAVE_ARPA_INET_H 31 | #include 32 | #endif 33 | #define Curl_inet_ntop(af,addr,buf,size) \ 34 | inet_ntop(af, addr, buf, (curl_socklen_t)size) 35 | #endif 36 | 37 | #endif /* HEADER_CURL_INET_NTOP_H */ 38 | 39 | -------------------------------------------------------------------------------- /components/curl/lib/inet_pton.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_INET_PTON_H 2 | #define HEADER_CURL_INET_PTON_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | int Curl_inet_pton(int, const char *, void *); 28 | 29 | #ifdef HAVE_INET_PTON 30 | #ifdef HAVE_ARPA_INET_H 31 | #include 32 | #elif defined(HAVE_WS2TCPIP_H) 33 | /* inet_pton() exists in Vista or later */ 34 | #include 35 | #endif 36 | #define Curl_inet_pton(x,y,z) inet_pton(x,y,z) 37 | #endif 38 | 39 | #endif /* HEADER_CURL_INET_PTON_H */ 40 | 41 | -------------------------------------------------------------------------------- /components/curl/lib/krb5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loboris/ESP32_curl_example/2916c5b2da33924eccff7f93b34febb7d965816b/components/curl/lib/krb5.c -------------------------------------------------------------------------------- /components/curl/lib/libcurl.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleInfoDictionaryVersion 6 | 6.0 7 | 8 | CFBundleDevelopmentRegion 9 | English 10 | 11 | CFBundleExecutable 12 | curl 13 | 14 | CFBundleIdentifier 15 | se.haxx.curl.libcurl 16 | 17 | CFBundleVersion 18 | 7.12.3 19 | 20 | CFBundleName 21 | libcurl 22 | 23 | CFBundlePackageType 24 | FMWK 25 | 26 | CFBundleSignature 27 | ???? 28 | 29 | CFBundleShortVersionString 30 | libcurl 7.12.3 31 | 32 | CFBundleGetInfoString 33 | libcurl.plist 7.12.3 34 | 35 | 36 | -------------------------------------------------------------------------------- /components/curl/lib/libcurl.rc: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | #include 23 | #include "../include/curl/curlver.h" 24 | 25 | LANGUAGE 0x09,0x01 26 | 27 | #define RC_VERSION LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR, LIBCURL_VERSION_PATCH, 0 28 | 29 | VS_VERSION_INFO VERSIONINFO 30 | FILEVERSION RC_VERSION 31 | PRODUCTVERSION RC_VERSION 32 | FILEFLAGSMASK 0x3fL 33 | #if defined(DEBUGBUILD) || defined(_DEBUG) 34 | FILEFLAGS 1 35 | #else 36 | FILEFLAGS 0 37 | #endif 38 | FILEOS VOS__WINDOWS32 39 | FILETYPE VFT_DLL 40 | FILESUBTYPE 0x0L 41 | 42 | BEGIN 43 | BLOCK "StringFileInfo" 44 | BEGIN 45 | BLOCK "040904b0" 46 | BEGIN 47 | VALUE "CompanyName", "The curl library, https://curl.haxx.se/\0" 48 | VALUE "FileDescription", "libcurl Shared Library\0" 49 | VALUE "FileVersion", LIBCURL_VERSION "\0" 50 | VALUE "InternalName", "libcurl\0" 51 | VALUE "OriginalFilename", "libcurl.dll\0" 52 | VALUE "ProductName", "The curl library\0" 53 | VALUE "ProductVersion", LIBCURL_VERSION "\0" 54 | VALUE "LegalCopyright", "\xa9 " LIBCURL_COPYRIGHT "\0" /* a9: Copyright symbol */ 55 | VALUE "License", "https://curl.haxx.se/docs/copyright.html\0" 56 | END 57 | END 58 | 59 | BLOCK "VarFileInfo" 60 | BEGIN 61 | VALUE "Translation", 0x409, 1200 62 | END 63 | END 64 | -------------------------------------------------------------------------------- /components/curl/lib/libcurl.vers.in: -------------------------------------------------------------------------------- 1 | HIDDEN 2 | { 3 | local: 4 | __*; 5 | _rest*; 6 | _save*; 7 | }; 8 | 9 | CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4 10 | { 11 | global: curl_*; 12 | local: *; 13 | }; 14 | -------------------------------------------------------------------------------- /components/curl/lib/llist.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_LLIST_H 2 | #define HEADER_CURL_LLIST_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | #include 27 | 28 | typedef void (*curl_llist_dtor)(void *, void *); 29 | 30 | struct curl_llist_element { 31 | void *ptr; 32 | struct curl_llist_element *prev; 33 | struct curl_llist_element *next; 34 | }; 35 | 36 | struct curl_llist { 37 | struct curl_llist_element *head; 38 | struct curl_llist_element *tail; 39 | curl_llist_dtor dtor; 40 | size_t size; 41 | }; 42 | 43 | void Curl_llist_init(struct curl_llist *, curl_llist_dtor); 44 | void Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, 45 | const void *, struct curl_llist_element *node); 46 | void Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, 47 | void *); 48 | size_t Curl_llist_count(struct curl_llist *); 49 | void Curl_llist_destroy(struct curl_llist *, void *); 50 | void Curl_llist_move(struct curl_llist *, struct curl_llist_element *, 51 | struct curl_llist *, struct curl_llist_element *); 52 | 53 | #endif /* HEADER_CURL_LLIST_H */ 54 | 55 | -------------------------------------------------------------------------------- /components/curl/lib/makefile.amiga: -------------------------------------------------------------------------------- 1 | # 2 | # libcurl Makefile for AmigaOS ... 3 | # 4 | 5 | # change the follow to where you have the AmiTCP SDK v4.3 includes: 6 | 7 | ATCPSDKI= /GG/netinclude 8 | 9 | 10 | CC = m68k-amigaos-gcc 11 | CFLAGS = -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall 12 | 13 | include Makefile.inc 14 | OBJS = $(CSOURCES:.c=.o) 15 | 16 | all: $(OBJS) 17 | ar cru libcurl.a $(OBJS) 18 | ranlib libcurl.a 19 | 20 | install: 21 | $(INSTALL) -c ./libcurl.a /lib/libcurl.a 22 | -------------------------------------------------------------------------------- /components/curl/lib/makefile.dj: -------------------------------------------------------------------------------- 1 | #*************************************************************************** 2 | # _ _ ____ _ 3 | # Project ___| | | | _ \| | 4 | # / __| | | | |_) | | 5 | # | (__| |_| | _ <| |___ 6 | # \___|\___/|_| \_\_____| 7 | # 8 | # Copyright (C) 2003 - 2008, Gisle Vanem . 9 | # Copyright (C) 2003 - 2017, Daniel Stenberg, , et al. 10 | # 11 | # This software is licensed as described in the file COPYING, which 12 | # you should have received as part of this distribution. The terms 13 | # are also available at https://curl.haxx.se/docs/copyright.html. 14 | # 15 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell 16 | # copies of the Software, and permit persons to whom the Software is 17 | # furnished to do so, under the terms of the COPYING file. 18 | # 19 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 20 | # KIND, either express or implied. 21 | # 22 | #*************************************************************************** 23 | 24 | # 25 | # Adapted for djgpp2 / Watt-32 / DOS 26 | # 27 | 28 | DEPEND_PREREQ = curl_config.h 29 | VPATH = vtls vauth 30 | TOPDIR = .. 31 | 32 | include ../packages/DOS/common.dj 33 | include Makefile.inc 34 | 35 | CFLAGS += -DBUILDING_LIBCURL 36 | 37 | SOURCES = $(sort $(CSOURCES)) 38 | OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o))) 39 | 40 | CURL_LIB = libcurl.a 41 | 42 | all: $(OBJ_DIR) curl_config.h $(CURL_LIB) 43 | 44 | $(CURL_LIB): $(OBJECTS) 45 | ar rs $@ $? 46 | 47 | curl_config.h: config-dos.h 48 | $(COPY) $^ $@ 49 | 50 | # clean generated files 51 | # 52 | genclean: 53 | - $(DELETE) curl_config.h 54 | 55 | # clean object files and subdir 56 | # 57 | objclean: genclean 58 | - $(DELETE) $(OBJ_DIR)$(DS)*.o 59 | - $(RMDIR) $(OBJ_DIR) 60 | 61 | # clean without removing built library 62 | # 63 | clean: objclean 64 | - $(DELETE) depend.dj 65 | 66 | # clean everything 67 | # 68 | realclean vclean: clean 69 | - $(DELETE) $(CURL_LIB) 70 | 71 | -include depend.dj 72 | 73 | -------------------------------------------------------------------------------- /components/curl/lib/netrc.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NETRC_H 2 | #define HEADER_CURL_NETRC_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */ 26 | int Curl_parsenetrc(const char *host, 27 | char **loginp, 28 | char **passwordp, 29 | char *filename); 30 | /* Assume: (*passwordp)[0]=0, host[0] != 0. 31 | * If (*loginp)[0] = 0, search for login and password within a machine 32 | * section in the netrc. 33 | * If (*loginp)[0] != 0, search for password within machine and login. 34 | */ 35 | 36 | #endif /* HEADER_CURL_NETRC_H */ 37 | -------------------------------------------------------------------------------- /components/curl/lib/non-ascii.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NON_ASCII_H 2 | #define HEADER_CURL_NON_ASCII_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #ifdef CURL_DOES_CONVERSIONS 27 | 28 | #include "urldata.h" 29 | 30 | /* 31 | * Curl_convert_clone() returns a malloced copy of the source string (if 32 | * returning CURLE_OK), with the data converted to network format. 33 | * 34 | * If no conversion was needed *outbuf may be NULL. 35 | */ 36 | CURLcode Curl_convert_clone(struct Curl_easy *data, 37 | const char *indata, 38 | size_t insize, 39 | char **outbuf); 40 | 41 | void Curl_convert_init(struct Curl_easy *data); 42 | void Curl_convert_setup(struct Curl_easy *data); 43 | void Curl_convert_close(struct Curl_easy *data); 44 | 45 | CURLcode Curl_convert_to_network(struct Curl_easy *data, 46 | char *buffer, size_t length); 47 | CURLcode Curl_convert_from_network(struct Curl_easy *data, 48 | char *buffer, size_t length); 49 | CURLcode Curl_convert_from_utf8(struct Curl_easy *data, 50 | char *buffer, size_t length); 51 | #else 52 | #define Curl_convert_clone(a,b,c,d) ((void)a, CURLE_OK) 53 | #define Curl_convert_init(x) Curl_nop_stmt 54 | #define Curl_convert_setup(x) Curl_nop_stmt 55 | #define Curl_convert_close(x) Curl_nop_stmt 56 | #define Curl_convert_to_network(a,b,c) ((void)a, CURLE_OK) 57 | #define Curl_convert_from_network(a,b,c) ((void)a, CURLE_OK) 58 | #define Curl_convert_from_utf8(a,b,c) ((void)a, CURLE_OK) 59 | #endif 60 | 61 | #endif /* HEADER_CURL_NON_ASCII_H */ 62 | -------------------------------------------------------------------------------- /components/curl/lib/nonblock.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #ifdef HAVE_SYS_IOCTL_H 26 | #include 27 | #endif 28 | #ifdef HAVE_FCNTL_H 29 | #include 30 | #endif 31 | 32 | #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE)) 33 | #include 34 | #endif 35 | #ifdef __VMS 36 | #include 37 | #include 38 | #endif 39 | 40 | #include "nonblock.h" 41 | 42 | /* 43 | * curlx_nonblock() set the given socket to either blocking or non-blocking 44 | * mode based on the 'nonblock' boolean argument. This function is highly 45 | * portable. 46 | */ 47 | int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ 48 | int nonblock /* TRUE or FALSE */) 49 | { 50 | #if defined(USE_BLOCKING_SOCKETS) 51 | 52 | return 0; /* returns success */ 53 | 54 | #elif defined(HAVE_FCNTL_O_NONBLOCK) 55 | 56 | /* most recent unix versions */ 57 | int flags; 58 | flags = sfcntl(sockfd, F_GETFL, 0); 59 | if(nonblock) 60 | return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK); 61 | return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); 62 | 63 | #elif defined(HAVE_IOCTL_FIONBIO) 64 | 65 | /* older unix versions */ 66 | int flags = nonblock ? 1 : 0; 67 | return ioctl(sockfd, FIONBIO, &flags); 68 | 69 | #elif defined(HAVE_IOCTLSOCKET_FIONBIO) 70 | 71 | /* Windows */ 72 | unsigned long flags = nonblock ? 1UL : 0UL; 73 | return ioctlsocket(sockfd, FIONBIO, &flags); 74 | 75 | #elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO) 76 | 77 | /* Amiga */ 78 | long flags = nonblock ? 1L : 0L; 79 | return IoctlSocket(sockfd, FIONBIO, (char *)&flags); 80 | 81 | #elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK) 82 | 83 | /* BeOS */ 84 | long b = nonblock ? 1L : 0L; 85 | return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); 86 | 87 | #else 88 | # error "no non-blocking method was found/used/set" 89 | #endif 90 | } 91 | -------------------------------------------------------------------------------- /components/curl/lib/nonblock.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NONBLOCK_H 2 | #define HEADER_CURL_NONBLOCK_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include /* for curl_socket_t */ 26 | 27 | int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ 28 | int nonblock /* TRUE or FALSE */); 29 | 30 | #endif /* HEADER_CURL_NONBLOCK_H */ 31 | 32 | -------------------------------------------------------------------------------- /components/curl/lib/nwos.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #ifdef NETWARE /* Novell NetWare */ 26 | 27 | #ifdef __NOVELL_LIBC__ 28 | /* For native LibC-based NLM we need to do nothing. */ 29 | int netware_init(void) 30 | { 31 | return 0; 32 | } 33 | 34 | #else /* __NOVELL_LIBC__ */ 35 | 36 | /* For native CLib-based NLM we need to initialize the LONG namespace. */ 37 | #include 38 | #include 39 | #include 40 | /* Make the CLIB Ctx stuff link */ 41 | #include 42 | NETDB_DEFINE_CONTEXT 43 | /* Make the CLIB Inet stuff link */ 44 | #include 45 | #include 46 | NETINET_DEFINE_CONTEXT 47 | 48 | int netware_init(void) 49 | { 50 | int rc = 0; 51 | unsigned int myHandle = GetNLMHandle(); 52 | /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ 53 | void (*pUnAugmentAsterisk)(int) = (void(*)(int)) 54 | ImportSymbol(myHandle, "UnAugmentAsterisk"); 55 | /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ 56 | void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) 57 | ImportSymbol(myHandle, "UseAccurateCaseForPaths"); 58 | if(pUnAugmentAsterisk) 59 | pUnAugmentAsterisk(1); 60 | if(pUseAccurateCaseForPaths) 61 | pUseAccurateCaseForPaths(1); 62 | UnimportSymbol(myHandle, "UnAugmentAsterisk"); 63 | UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); 64 | /* set long name space */ 65 | if((SetCurrentNameSpace(4) == 255)) { 66 | rc = 1; 67 | } 68 | if((SetTargetNameSpace(4) == 255)) { 69 | rc = rc + 2; 70 | } 71 | return rc; 72 | } 73 | 74 | /* dummy function to satisfy newer prelude */ 75 | int __init_environment(void) 76 | { 77 | return 0; 78 | } 79 | 80 | /* dummy function to satisfy newer prelude */ 81 | int __deinit_environment(void) 82 | { 83 | return 0; 84 | } 85 | 86 | #endif /* __NOVELL_LIBC__ */ 87 | 88 | #endif /* NETWARE */ 89 | -------------------------------------------------------------------------------- /components/curl/lib/parsedate.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_PARSEDATE_H 2 | #define HEADER_CURL_PARSEDATE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | extern const char * const Curl_wkday[7]; 26 | extern const char * const Curl_month[12]; 27 | 28 | CURLcode Curl_gmtime(time_t intime, struct tm *store); 29 | 30 | #endif /* HEADER_CURL_PARSEDATE_H */ 31 | 32 | -------------------------------------------------------------------------------- /components/curl/lib/pipeline.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_PIPELINE_H 2 | #define HEADER_CURL_PIPELINE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2015 - 2017, Daniel Stenberg, , et al. 11 | * Copyright (C) 2013 - 2014, Linus Nielsen Feltzing, 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | 26 | CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle, 27 | struct connectdata *conn); 28 | void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle, 29 | struct connectdata *conn); 30 | bool Curl_pipeline_penalized(struct Curl_easy *data, 31 | struct connectdata *conn); 32 | 33 | bool Curl_pipeline_site_blacklisted(struct Curl_easy *handle, 34 | struct connectdata *conn); 35 | 36 | CURLMcode Curl_pipeline_set_site_blacklist(char **sites, 37 | struct curl_llist *list_ptr); 38 | 39 | bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, 40 | char *server_name); 41 | 42 | CURLMcode Curl_pipeline_set_server_blacklist(char **servers, 43 | struct curl_llist *list_ptr); 44 | 45 | bool Curl_pipeline_checkget_write(struct Curl_easy *data, 46 | struct connectdata *conn); 47 | bool Curl_pipeline_checkget_read(struct Curl_easy *data, 48 | struct connectdata *conn); 49 | void Curl_pipeline_leave_write(struct connectdata *conn); 50 | void Curl_pipeline_leave_read(struct connectdata *conn); 51 | bool Curl_recvpipe_head(struct Curl_easy *data, 52 | struct connectdata *conn); 53 | bool Curl_sendpipe_head(struct Curl_easy *data, 54 | struct connectdata *conn); 55 | 56 | #endif /* HEADER_CURL_PIPELINE_H */ 57 | -------------------------------------------------------------------------------- /components/curl/lib/progress.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_PROGRESS_H 2 | #define HEADER_CURL_PROGRESS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "timeval.h" 26 | 27 | 28 | typedef enum { 29 | TIMER_NONE, 30 | TIMER_STARTOP, 31 | TIMER_STARTSINGLE, 32 | TIMER_NAMELOOKUP, 33 | TIMER_CONNECT, 34 | TIMER_APPCONNECT, 35 | TIMER_PRETRANSFER, 36 | TIMER_STARTTRANSFER, 37 | TIMER_POSTRANSFER, 38 | TIMER_STARTACCEPT, 39 | TIMER_REDIRECT, 40 | TIMER_LAST /* must be last */ 41 | } timerid; 42 | 43 | int Curl_pgrsDone(struct connectdata *); 44 | void Curl_pgrsStartNow(struct Curl_easy *data); 45 | void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size); 46 | void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size); 47 | void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size); 48 | void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size); 49 | int Curl_pgrsUpdate(struct connectdata *); 50 | void Curl_pgrsResetTransferSizes(struct Curl_easy *data); 51 | void Curl_pgrsTime(struct Curl_easy *data, timerid timer); 52 | long Curl_pgrsLimitWaitTime(curl_off_t cursize, 53 | curl_off_t startsize, 54 | curl_off_t limit, 55 | struct curltime start, 56 | struct curltime now); 57 | 58 | /* Don't show progress for sizes smaller than: */ 59 | #define LEAST_SIZE_PROGRESS BUFSIZE 60 | 61 | #define PROGRESS_DOWNLOAD (1<<0) 62 | #define PROGRESS_UPLOAD (1<<1) 63 | #define PROGRESS_DOWN_AND_UP (PROGRESS_UPLOAD | PROGRESS_DOWNLOAD) 64 | 65 | #define PGRS_SHOW_DL (1<<0) 66 | #define PGRS_SHOW_UL (1<<1) 67 | #define PGRS_DONE_DL (1<<2) 68 | #define PGRS_DONE_UL (1<<3) 69 | #define PGRS_HIDE (1<<4) 70 | #define PGRS_UL_SIZE_KNOWN (1<<5) 71 | #define PGRS_DL_SIZE_KNOWN (1<<6) 72 | 73 | #define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */ 74 | 75 | 76 | #endif /* HEADER_CURL_PROGRESS_H */ 77 | 78 | -------------------------------------------------------------------------------- /components/curl/lib/rand.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_RAND_H 2 | #define HEADER_CURL_RAND_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* 26 | * Curl_rand() stores 'num' number of random unsigned characters in the buffer 27 | * 'rnd' points to. 28 | * 29 | * If libcurl is built without TLS support or with a TLS backend that lacks a 30 | * proper random API (Gskit, PolarSSL or mbedTLS), this function will use 31 | * "weak" random. 32 | * 33 | * When built *with* TLS support and a backend that offers strong random, it 34 | * will return error if it cannot provide strong random values. 35 | * 36 | * NOTE: 'data' may be passed in as NULL when coming from external API without 37 | * easy handle! 38 | * 39 | */ 40 | CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num); 41 | 42 | /* Same as above but outputs only random lowercase hex characters. 43 | Does NOT terminate.*/ 44 | CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, 45 | size_t num); 46 | 47 | #endif /* HEADER_CURL_RAND_H */ 48 | -------------------------------------------------------------------------------- /components/curl/lib/rtsp.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_RTSP_H 2 | #define HEADER_CURL_RTSP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifndef CURL_DISABLE_RTSP 25 | 26 | extern const struct Curl_handler Curl_handler_rtsp; 27 | 28 | CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header); 29 | 30 | #else 31 | /* disabled */ 32 | #define Curl_rtsp_parseheader(x,y) CURLE_NOT_BUILT_IN 33 | 34 | #endif /* CURL_DISABLE_RTSP */ 35 | 36 | /* 37 | * RTSP Connection data 38 | * 39 | * Currently, only used for tracking incomplete RTP data reads 40 | */ 41 | struct rtsp_conn { 42 | char *rtp_buf; 43 | ssize_t rtp_bufsize; 44 | int rtp_channel; 45 | }; 46 | 47 | /**************************************************************************** 48 | * RTSP unique setup 49 | ***************************************************************************/ 50 | struct RTSP { 51 | /* 52 | * http_wrapper MUST be the first element of this structure for the wrap 53 | * logic to work. In this way, we get a cheap polymorphism because 54 | * &(data->state.proto.rtsp) == &(data->state.proto.http) per the C spec 55 | * 56 | * HTTP functions can safely treat this as an HTTP struct, but RTSP aware 57 | * functions can also index into the later elements. 58 | */ 59 | struct HTTP http_wrapper; /*wrap HTTP to do the heavy lifting */ 60 | 61 | long CSeq_sent; /* CSeq of this request */ 62 | long CSeq_recv; /* CSeq received */ 63 | }; 64 | 65 | 66 | #endif /* HEADER_CURL_RTSP_H */ 67 | 68 | -------------------------------------------------------------------------------- /components/curl/lib/security.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loboris/ESP32_curl_example/2916c5b2da33924eccff7f93b34febb7d965816b/components/curl/lib/security.c -------------------------------------------------------------------------------- /components/curl/lib/setopt.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SETOPT_H 2 | #define HEADER_CURL_SETOPT_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | CURLcode Curl_setstropt(char **charp, const char *s); 26 | 27 | #endif /* HEADER_CURL_SETOPT_H */ 28 | -------------------------------------------------------------------------------- /components/curl/lib/share.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SHARE_H 2 | #define HEADER_CURL_SHARE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | #include 27 | #include "cookie.h" 28 | #include "urldata.h" 29 | #include "conncache.h" 30 | 31 | /* SalfordC says "A structure member may not be volatile". Hence: 32 | */ 33 | #ifdef __SALFORDC__ 34 | #define CURL_VOLATILE 35 | #else 36 | #define CURL_VOLATILE volatile 37 | #endif 38 | 39 | /* this struct is libcurl-private, don't export details */ 40 | struct Curl_share { 41 | unsigned int specifier; 42 | CURL_VOLATILE unsigned int dirty; 43 | 44 | curl_lock_function lockfunc; 45 | curl_unlock_function unlockfunc; 46 | void *clientdata; 47 | struct conncache conn_cache; 48 | struct curl_hash hostcache; 49 | #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) 50 | struct CookieInfo *cookies; 51 | #endif 52 | 53 | struct curl_ssl_session *sslsession; 54 | size_t max_ssl_sessions; 55 | long sessionage; 56 | }; 57 | 58 | CURLSHcode Curl_share_lock(struct Curl_easy *, curl_lock_data, 59 | curl_lock_access); 60 | CURLSHcode Curl_share_unlock(struct Curl_easy *, curl_lock_data); 61 | 62 | #endif /* HEADER_CURL_SHARE_H */ 63 | -------------------------------------------------------------------------------- /components/curl/lib/sigpipe.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SIGPIPE_H 2 | #define HEADER_CURL_SIGPIPE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && defined(USE_OPENSSL) 27 | #include 28 | 29 | struct sigpipe_ignore { 30 | struct sigaction old_pipe_act; 31 | bool no_signal; 32 | }; 33 | 34 | #define SIGPIPE_VARIABLE(x) struct sigpipe_ignore x 35 | 36 | /* 37 | * sigpipe_ignore() makes sure we ignore SIGPIPE while running libcurl 38 | * internals, and then sigpipe_restore() will restore the situation when we 39 | * return from libcurl again. 40 | */ 41 | static void sigpipe_ignore(struct Curl_easy *data, 42 | struct sigpipe_ignore *ig) 43 | { 44 | /* get a local copy of no_signal because the Curl_easy might not be 45 | around when we restore */ 46 | ig->no_signal = data->set.no_signal; 47 | if(!data->set.no_signal) { 48 | struct sigaction action; 49 | /* first, extract the existing situation */ 50 | memset(&ig->old_pipe_act, 0, sizeof(struct sigaction)); 51 | sigaction(SIGPIPE, NULL, &ig->old_pipe_act); 52 | action = ig->old_pipe_act; 53 | /* ignore this signal */ 54 | action.sa_handler = SIG_IGN; 55 | sigaction(SIGPIPE, &action, NULL); 56 | } 57 | } 58 | 59 | /* 60 | * sigpipe_restore() puts back the outside world's opinion of signal handler 61 | * and SIGPIPE handling. It MUST only be called after a corresponding 62 | * sigpipe_ignore() was used. 63 | */ 64 | static void sigpipe_restore(struct sigpipe_ignore *ig) 65 | { 66 | if(!ig->no_signal) 67 | /* restore the outside state */ 68 | sigaction(SIGPIPE, &ig->old_pipe_act, NULL); 69 | } 70 | 71 | #else 72 | /* for systems without sigaction */ 73 | #define sigpipe_ignore(x,y) Curl_nop_stmt 74 | #define sigpipe_restore(x) Curl_nop_stmt 75 | #define SIGPIPE_VARIABLE(x) 76 | #endif 77 | 78 | #endif /* HEADER_CURL_SIGPIPE_H */ 79 | -------------------------------------------------------------------------------- /components/curl/lib/slist.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SLIST_H 2 | #define HEADER_CURL_SLIST_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* 26 | * Curl_slist_duplicate() duplicates a linked list. It always returns the 27 | * address of the first record of the cloned list or NULL in case of an 28 | * error (or if the input list was NULL). 29 | */ 30 | struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist); 31 | 32 | /* 33 | * Curl_slist_append_nodup() takes ownership of the given string and appends 34 | * it to the list. 35 | */ 36 | struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, 37 | char *data); 38 | 39 | #endif /* HEADER_CURL_SLIST_H */ 40 | 41 | -------------------------------------------------------------------------------- /components/curl/lib/sockaddr.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SOCKADDR_H 2 | #define HEADER_CURL_SOCKADDR_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | struct Curl_sockaddr_storage { 28 | union { 29 | struct sockaddr sa; 30 | struct sockaddr_in sa_in; 31 | #ifdef ENABLE_IPV6 32 | struct sockaddr_in6 sa_in6; 33 | #endif 34 | #ifdef HAVE_STRUCT_SOCKADDR_STORAGE 35 | struct sockaddr_storage sa_stor; 36 | #else 37 | char cbuf[256]; /* this should be big enough to fit a lot */ 38 | #endif 39 | } buffer; 40 | }; 41 | 42 | #endif /* HEADER_CURL_SOCKADDR_H */ 43 | 44 | -------------------------------------------------------------------------------- /components/curl/lib/socks.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SOCKS_H 2 | #define HEADER_CURL_SOCKS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #ifdef CURL_DISABLE_PROXY 28 | #define Curl_SOCKS4(a,b,c,d,e) CURLE_NOT_BUILT_IN 29 | #define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN 30 | #else 31 | /* 32 | * Helper read-from-socket functions. Does the same as Curl_read() but it 33 | * blocks until all bytes amount of buffersize will be read. No more, no less. 34 | * 35 | * This is STUPID BLOCKING behaviour which we frown upon, but right now this 36 | * is what we have... 37 | */ 38 | int Curl_blockread_all(struct connectdata *conn, 39 | curl_socket_t sockfd, 40 | char *buf, 41 | ssize_t buffersize, 42 | ssize_t *n); 43 | 44 | /* 45 | * This function logs in to a SOCKS4(a) proxy and sends the specifics to the 46 | * final destination server. 47 | */ 48 | CURLcode Curl_SOCKS4(const char *proxy_name, 49 | const char *hostname, 50 | int remote_port, 51 | int sockindex, 52 | struct connectdata *conn); 53 | 54 | /* 55 | * This function logs in to a SOCKS5 proxy and sends the specifics to the 56 | * final destination server. 57 | */ 58 | CURLcode Curl_SOCKS5(const char *proxy_name, 59 | const char *proxy_password, 60 | const char *hostname, 61 | int remote_port, 62 | int sockindex, 63 | struct connectdata *conn); 64 | 65 | #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) 66 | /* 67 | * This function handles the SOCKS5 GSS-API negotiation and initialisation 68 | */ 69 | CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, 70 | struct connectdata *conn); 71 | #endif 72 | 73 | #endif /* CURL_DISABLE_PROXY */ 74 | 75 | #endif /* HEADER_CURL_SOCKS_H */ 76 | 77 | -------------------------------------------------------------------------------- /components/curl/lib/speedcheck.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include 26 | #include "urldata.h" 27 | #include "sendf.h" 28 | #include "multiif.h" 29 | #include "speedcheck.h" 30 | 31 | void Curl_speedinit(struct Curl_easy *data) 32 | { 33 | memset(&data->state.keeps_speed, 0, sizeof(struct curltime)); 34 | } 35 | 36 | /* 37 | * @unittest: 1606 38 | */ 39 | CURLcode Curl_speedcheck(struct Curl_easy *data, 40 | struct curltime now) 41 | { 42 | if((data->progress.current_speed >= 0) && data->set.low_speed_time) { 43 | if(data->progress.current_speed < data->set.low_speed_limit) { 44 | if(!data->state.keeps_speed.tv_sec) 45 | /* under the limit at this very moment */ 46 | data->state.keeps_speed = now; 47 | else { 48 | /* how long has it been under the limit */ 49 | timediff_t howlong = Curl_timediff(now, data->state.keeps_speed); 50 | 51 | if(howlong >= data->set.low_speed_time * 1000) { 52 | /* too long */ 53 | failf(data, 54 | "Operation too slow. " 55 | "Less than %ld bytes/sec transferred the last %ld seconds", 56 | data->set.low_speed_limit, 57 | data->set.low_speed_time); 58 | return CURLE_OPERATION_TIMEDOUT; 59 | } 60 | } 61 | } 62 | else 63 | /* faster right now */ 64 | data->state.keeps_speed.tv_sec = 0; 65 | } 66 | 67 | if(data->set.low_speed_limit) 68 | /* if low speed limit is enabled, set the expire timer to make this 69 | connection's speed get checked again in a second */ 70 | Curl_expire(data, 1000, EXPIRE_SPEEDCHECK); 71 | 72 | return CURLE_OK; 73 | } 74 | -------------------------------------------------------------------------------- /components/curl/lib/speedcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SPEEDCHECK_H 2 | #define HEADER_CURL_SPEEDCHECK_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #include "timeval.h" 28 | 29 | void Curl_speedinit(struct Curl_easy *data); 30 | CURLcode Curl_speedcheck(struct Curl_easy *data, 31 | struct curltime now); 32 | 33 | #endif /* HEADER_CURL_SPEEDCHECK_H */ 34 | -------------------------------------------------------------------------------- /components/curl/lib/splay.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SPLAY_H 2 | #define HEADER_CURL_SPLAY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1997 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | #include "timeval.h" 26 | 27 | struct Curl_tree { 28 | struct Curl_tree *smaller; /* smaller node */ 29 | struct Curl_tree *larger; /* larger node */ 30 | struct Curl_tree *samen; /* points to the next node with identical key */ 31 | struct Curl_tree *samep; /* points to the prev node with identical key */ 32 | struct curltime key; /* this node's "sort" key */ 33 | void *payload; /* data the splay code doesn't care about */ 34 | }; 35 | 36 | struct Curl_tree *Curl_splay(struct curltime i, 37 | struct Curl_tree *t); 38 | 39 | struct Curl_tree *Curl_splayinsert(struct curltime key, 40 | struct Curl_tree *t, 41 | struct Curl_tree *newnode); 42 | 43 | #if 0 44 | struct Curl_tree *Curl_splayremove(struct curltime key, 45 | struct Curl_tree *t, 46 | struct Curl_tree **removed); 47 | #endif 48 | 49 | struct Curl_tree *Curl_splaygetbest(struct curltime key, 50 | struct Curl_tree *t, 51 | struct Curl_tree **removed); 52 | 53 | int Curl_splayremovebyaddr(struct Curl_tree *t, 54 | struct Curl_tree *removenode, 55 | struct Curl_tree **newroot); 56 | 57 | #define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ 58 | ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ 59 | ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \ 60 | ( ((i.tv_usec) > (j.tv_usec)) ? 1 : 0)))) 61 | 62 | #ifdef DEBUGBUILD 63 | void Curl_splayprint(struct Curl_tree * t, int d, char output); 64 | #else 65 | #define Curl_splayprint(x,y,z) Curl_nop_stmt 66 | #endif 67 | 68 | #endif /* HEADER_CURL_SPLAY_H */ 69 | -------------------------------------------------------------------------------- /components/curl/lib/strcase.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_STRCASE_H 2 | #define HEADER_CURL_STRCASE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | /* 28 | * Only "raw" case insensitive strings. This is meant to be locale independent 29 | * and only compare strings we know are safe for this. 30 | * 31 | * The function is capable of comparing a-z case insensitively even for 32 | * non-ascii. 33 | */ 34 | 35 | #define strcasecompare(a,b) Curl_strcasecompare(a,b) 36 | #define strncasecompare(a,b,c) Curl_strncasecompare(a,b,c) 37 | 38 | int Curl_strcasecompare(const char *first, const char *second); 39 | int Curl_safe_strcasecompare(const char *first, const char *second); 40 | int Curl_strncasecompare(const char *first, const char *second, size_t max); 41 | 42 | char Curl_raw_toupper(char in); 43 | 44 | /* checkprefix() is a shorter version of the above, used when the first 45 | argument is zero-byte terminated */ 46 | #define checkprefix(a,b) curl_strnequal(a,b,strlen(a)) 47 | 48 | void Curl_strntoupper(char *dest, const char *src, size_t n); 49 | char Curl_raw_toupper(char in); 50 | 51 | #endif /* HEADER_CURL_STRCASE_H */ 52 | -------------------------------------------------------------------------------- /components/curl/lib/strdup.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_STRDUP_H 2 | #define HEADER_CURL_STRDUP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #ifndef HAVE_STRDUP 27 | extern char *curlx_strdup(const char *str); 28 | #endif 29 | void *Curl_memdup(const void *src, size_t buffer_length); 30 | void *Curl_saferealloc(void *ptr, size_t size); 31 | 32 | #endif /* HEADER_CURL_STRDUP_H */ 33 | -------------------------------------------------------------------------------- /components/curl/lib/strerror.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_STRERROR_H 2 | #define HEADER_CURL_STRERROR_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "urldata.h" 26 | 27 | const char *Curl_strerror (struct connectdata *conn, int err); 28 | 29 | #ifdef USE_LIBIDN2 30 | const char *Curl_idn_strerror (struct connectdata *conn, int err); 31 | #endif 32 | 33 | #ifdef USE_WINDOWS_SSPI 34 | const char *Curl_sspi_strerror (struct connectdata *conn, int err); 35 | #endif 36 | 37 | #endif /* HEADER_CURL_STRERROR_H */ 38 | -------------------------------------------------------------------------------- /components/curl/lib/strtok.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #ifndef HAVE_STRTOK_R 26 | #include 27 | 28 | #include "strtok.h" 29 | 30 | char * 31 | Curl_strtok_r(char *ptr, const char *sep, char **end) 32 | { 33 | if(!ptr) 34 | /* we got NULL input so then we get our last position instead */ 35 | ptr = *end; 36 | 37 | /* pass all letters that are including in the separator string */ 38 | while(*ptr && strchr(sep, *ptr)) 39 | ++ptr; 40 | 41 | if(*ptr) { 42 | /* so this is where the next piece of string starts */ 43 | char *start = ptr; 44 | 45 | /* set the end pointer to the first byte after the start */ 46 | *end = start + 1; 47 | 48 | /* scan through the string to find where it ends, it ends on a 49 | null byte or a character that exists in the separator string */ 50 | while(**end && !strchr(sep, **end)) 51 | ++*end; 52 | 53 | if(**end) { 54 | /* the end is not a null byte */ 55 | **end = '\0'; /* zero terminate it! */ 56 | ++*end; /* advance the last pointer to beyond the null byte */ 57 | } 58 | 59 | return start; /* return the position where the string starts */ 60 | } 61 | 62 | /* we ended up on a null byte, there are no more strings to find! */ 63 | return NULL; 64 | } 65 | 66 | #endif /* this was only compiled if strtok_r wasn't present */ 67 | -------------------------------------------------------------------------------- /components/curl/lib/strtok.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_STRTOK_H 2 | #define HEADER_CURL_STRTOK_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | #include 26 | 27 | #ifndef HAVE_STRTOK_R 28 | char *Curl_strtok_r(char *s, const char *delim, char **last); 29 | #define strtok_r Curl_strtok_r 30 | #else 31 | #include 32 | #endif 33 | 34 | #endif /* HEADER_CURL_STRTOK_H */ 35 | -------------------------------------------------------------------------------- /components/curl/lib/strtoofft.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_STRTOOFFT_H 2 | #define HEADER_CURL_STRTOOFFT_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | /* 28 | * Determine which string to integral data type conversion function we use 29 | * to implement string conversion to our curl_off_t integral data type. 30 | * 31 | * Notice that curl_off_t might be 64 or 32 bit wide, and that it might use 32 | * an underlying data type which might be 'long', 'int64_t', 'long long' or 33 | * '__int64' and more remotely other data types. 34 | * 35 | * On systems where the size of curl_off_t is greater than the size of 'long' 36 | * the conversion function to use is strtoll() if it is available, otherwise, 37 | * we emulate its functionality with our own clone. 38 | * 39 | * On systems where the size of curl_off_t is smaller or equal than the size 40 | * of 'long' the conversion function to use is strtol(). 41 | */ 42 | 43 | #if (SIZEOF_CURL_OFF_T == 4) 44 | # define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF) 45 | #else 46 | /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ 47 | # define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) 48 | #endif 49 | #define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1)) 50 | 51 | typedef enum { 52 | CURL_OFFT_OK, /* parsed fine */ 53 | CURL_OFFT_FLOW, /* over or underflow */ 54 | CURL_OFFT_INVAL /* nothing was parsed */ 55 | } CURLofft; 56 | 57 | CURLofft curlx_strtoofft(const char *str, char **endp, int base, 58 | curl_off_t *num); 59 | 60 | #endif /* HEADER_CURL_STRTOOFFT_H */ 61 | -------------------------------------------------------------------------------- /components/curl/lib/system_win32.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SYSTEM_WIN32_H 2 | #define HEADER_CURL_SYSTEM_WIN32_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2016, Steve Holme, . 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if defined(WIN32) 28 | 29 | /* Version condition */ 30 | typedef enum { 31 | VERSION_LESS_THAN, 32 | VERSION_LESS_THAN_EQUAL, 33 | VERSION_EQUAL, 34 | VERSION_GREATER_THAN_EQUAL, 35 | VERSION_GREATER_THAN 36 | } VersionCondition; 37 | 38 | /* Platform identifier */ 39 | typedef enum { 40 | PLATFORM_DONT_CARE, 41 | PLATFORM_WINDOWS, 42 | PLATFORM_WINNT 43 | } PlatformIdentifier; 44 | 45 | /* This is used to verify if we are running on a specific windows version */ 46 | bool Curl_verify_windows_version(const unsigned int majorVersion, 47 | const unsigned int minorVersion, 48 | const PlatformIdentifier platform, 49 | const VersionCondition condition); 50 | 51 | #if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ 52 | defined(USE_WINSOCK)) 53 | 54 | /* This is used to dynamically load DLLs */ 55 | HMODULE Curl_load_library(LPCTSTR filename); 56 | 57 | #endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */ 58 | 59 | #endif /* WIN32 */ 60 | 61 | #endif /* HEADER_CURL_SYSTEM_WIN32_H */ 62 | -------------------------------------------------------------------------------- /components/curl/lib/telnet.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_TELNET_H 2 | #define HEADER_CURL_TELNET_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifndef CURL_DISABLE_TELNET 25 | extern const struct Curl_handler Curl_handler_telnet; 26 | #endif 27 | 28 | #endif /* HEADER_CURL_TELNET_H */ 29 | 30 | -------------------------------------------------------------------------------- /components/curl/lib/tftp.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_TFTP_H 2 | #define HEADER_CURL_TFTP_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifndef CURL_DISABLE_TFTP 25 | extern const struct Curl_handler Curl_handler_tftp; 26 | #endif 27 | 28 | #endif /* HEADER_CURL_TFTP_H */ 29 | 30 | -------------------------------------------------------------------------------- /components/curl/lib/timeval.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_TIMEVAL_H 2 | #define HEADER_CURL_TIMEVAL_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #if SIZEOF_TIME_T < 8 28 | typedef int timediff_t; 29 | #else 30 | typedef curl_off_t timediff_t; 31 | #endif 32 | 33 | struct curltime { 34 | time_t tv_sec; /* seconds */ 35 | int tv_usec; /* microseconds */ 36 | }; 37 | 38 | struct curltime Curl_now(void); 39 | 40 | /* 41 | * Make sure that the first argument (t1) is the more recent time and t2 is 42 | * the older time, as otherwise you get a weird negative time-diff back... 43 | * 44 | * Returns: the time difference in number of milliseconds. 45 | */ 46 | timediff_t Curl_timediff(struct curltime t1, struct curltime t2); 47 | 48 | /* 49 | * Make sure that the first argument (t1) is the more recent time and t2 is 50 | * the older time, as otherwise you get a weird negative time-diff back... 51 | * 52 | * Returns: the time difference in number of microseconds. 53 | */ 54 | timediff_t Curl_timediff_us(struct curltime newer, struct curltime older); 55 | 56 | #endif /* HEADER_CURL_TIMEVAL_H */ 57 | -------------------------------------------------------------------------------- /components/curl/lib/vauth/digest.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_DIGEST_H 2 | #define HEADER_CURL_DIGEST_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | #if !defined(CURL_DISABLE_CRYPTO_AUTH) 28 | 29 | #define DIGEST_MAX_VALUE_LENGTH 256 30 | #define DIGEST_MAX_CONTENT_LENGTH 1024 31 | 32 | enum { 33 | CURLDIGESTALGO_MD5, 34 | CURLDIGESTALGO_MD5SESS, 35 | CURLDIGESTALGO_SHA256, 36 | CURLDIGESTALGO_SHA256SESS, 37 | CURLDIGESTALGO_SHA512_256, 38 | CURLDIGESTALGO_SHA512_256SESS 39 | }; 40 | 41 | /* This is used to extract the realm from a challenge message */ 42 | bool Curl_auth_digest_get_pair(const char *str, char *value, char *content, 43 | const char **endptr); 44 | 45 | #endif 46 | 47 | #endif /* HEADER_CURL_DIGEST_H */ 48 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/axtls.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_AXTLS_H 2 | #define HEADER_CURL_AXTLS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2010, DirecTV, Contact: Eric Hu 11 | * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | 26 | #ifdef USE_AXTLS 27 | #include "curl/curl.h" 28 | #include "urldata.h" 29 | 30 | extern const struct Curl_ssl Curl_ssl_axtls; 31 | 32 | #endif /* USE_AXTLS */ 33 | #endif /* HEADER_CURL_AXTLS_H */ 34 | 35 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/cyassl.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_CYASSL_H 2 | #define HEADER_CURL_CYASSL_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #ifdef USE_CYASSL 27 | 28 | extern const struct Curl_ssl Curl_ssl_cyassl; 29 | 30 | #endif /* USE_CYASSL */ 31 | #endif /* HEADER_CURL_CYASSL_H */ 32 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/darwinssl.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_DARWINSSL_H 2 | #define HEADER_CURL_DARWINSSL_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2012 - 2014, Nick Zitzmann, . 11 | * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_DARWINSSL 28 | 29 | extern const struct Curl_ssl Curl_ssl_darwinssl; 30 | 31 | #endif /* USE_DARWINSSL */ 32 | #endif /* HEADER_CURL_DARWINSSL_H */ 33 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/gskit.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GSKIT_H 2 | #define HEADER_CURL_GSKIT_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | /* 27 | * This header should only be needed to get included by vtls.c and gskit.c 28 | */ 29 | 30 | #include "urldata.h" 31 | 32 | #ifdef USE_GSKIT 33 | 34 | extern const struct Curl_ssl Curl_ssl_gskit; 35 | 36 | #endif /* USE_GSKIT */ 37 | 38 | #endif /* HEADER_CURL_GSKIT_H */ 39 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/gtls.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_GTLS_H 2 | #define HEADER_CURL_GTLS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_GNUTLS 28 | 29 | #include "urldata.h" 30 | 31 | extern const struct Curl_ssl Curl_ssl_gnutls; 32 | 33 | #endif /* USE_GNUTLS */ 34 | #endif /* HEADER_CURL_GTLS_H */ 35 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/mbedtls.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_MBEDTLS_H 2 | #define HEADER_CURL_MBEDTLS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. 11 | * Copyright (C) 2010, Hoi-Ho Chan, 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_MBEDTLS 28 | 29 | extern const struct Curl_ssl Curl_ssl_mbedtls; 30 | 31 | #endif /* USE_MBEDTLS */ 32 | #endif /* HEADER_CURL_MBEDTLS_H */ 33 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/nssg.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_NSSG_H 2 | #define HEADER_CURL_NSSG_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #include "curl_setup.h" 25 | 26 | #ifdef USE_NSS 27 | /* 28 | * This header should only be needed to get included by vtls.c and nss.c 29 | */ 30 | 31 | #include "urldata.h" 32 | 33 | /* initialize NSS library if not already */ 34 | CURLcode Curl_nss_force_init(struct Curl_easy *data); 35 | 36 | extern const struct Curl_ssl Curl_ssl_nss; 37 | 38 | #endif /* USE_NSS */ 39 | #endif /* HEADER_CURL_NSSG_H */ 40 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/openssl.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SSLUSE_H 2 | #define HEADER_CURL_SSLUSE_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_OPENSSL 28 | /* 29 | * This header should only be needed to get included by vtls.c and openssl.c 30 | */ 31 | 32 | #include "urldata.h" 33 | 34 | extern const struct Curl_ssl Curl_ssl_openssl; 35 | 36 | #endif /* USE_OPENSSL */ 37 | #endif /* HEADER_CURL_SSLUSE_H */ 38 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/polarssl.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_POLARSSL_H 2 | #define HEADER_CURL_POLARSSL_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. 11 | * Copyright (C) 2010, Hoi-Ho Chan, 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_POLARSSL 28 | 29 | extern const struct Curl_ssl Curl_ssl_polarssl; 30 | 31 | #endif /* USE_POLARSSL */ 32 | #endif /* HEADER_CURL_POLARSSL_H */ 33 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/polarssl_threadlock.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_POLARSSL_THREADLOCK_H 2 | #define HEADER_CURL_POLARSSL_THREADLOCK_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2013-2015, Daniel Stenberg, , et al. 11 | * Copyright (C) 2010, Hoi-Ho Chan, 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | #include "curl_setup.h" 26 | 27 | #if (defined USE_POLARSSL) || (defined USE_MBEDTLS) 28 | 29 | #if defined(USE_THREADS_POSIX) 30 | # define POLARSSL_MUTEX_T pthread_mutex_t 31 | #elif defined(USE_THREADS_WIN32) 32 | # define POLARSSL_MUTEX_T HANDLE 33 | #endif 34 | 35 | #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) 36 | 37 | int Curl_polarsslthreadlock_thread_setup(void); 38 | int Curl_polarsslthreadlock_thread_cleanup(void); 39 | int Curl_polarsslthreadlock_lock_function(int n); 40 | int Curl_polarsslthreadlock_unlock_function(int n); 41 | 42 | #else 43 | 44 | #define Curl_polarsslthreadlock_thread_setup() 1 45 | #define Curl_polarsslthreadlock_thread_cleanup() 1 46 | #define Curl_polarsslthreadlock_lock_function(x) 1 47 | #define Curl_polarsslthreadlock_unlock_function(x) 1 48 | 49 | #endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ 50 | 51 | #endif /* USE_POLARSSL */ 52 | 53 | #endif /* HEADER_CURL_POLARSSL_THREADLOCK_H */ 54 | -------------------------------------------------------------------------------- /components/curl/lib/vtls/schannel.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_SCHANNEL_H 2 | #define HEADER_CURL_SCHANNEL_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2012, Marc Hoersken, , et al. 11 | * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. 12 | * 13 | * This software is licensed as described in the file COPYING, which 14 | * you should have received as part of this distribution. The terms 15 | * are also available at https://curl.haxx.se/docs/copyright.html. 16 | * 17 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 | * copies of the Software, and permit persons to whom the Software is 19 | * furnished to do so, under the terms of the COPYING file. 20 | * 21 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 | * KIND, either express or implied. 23 | * 24 | ***************************************************************************/ 25 | #include "curl_setup.h" 26 | 27 | #ifdef USE_SCHANNEL 28 | 29 | #include "urldata.h" 30 | 31 | extern const struct Curl_ssl Curl_ssl_schannel; 32 | 33 | #endif /* USE_SCHANNEL */ 34 | #endif /* HEADER_CURL_SCHANNEL_H */ 35 | -------------------------------------------------------------------------------- /components/curl/lib/wildcard.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * _ _ ____ _ 3 | * Project ___| | | | _ \| | 4 | * / __| | | | |_) | | 5 | * | (__| |_| | _ <| |___ 6 | * \___|\___/|_| \_\_____| 7 | * 8 | * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. 9 | * 10 | * This software is licensed as described in the file COPYING, which 11 | * you should have received as part of this distribution. The terms 12 | * are also available at https://curl.haxx.se/docs/copyright.html. 13 | * 14 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 15 | * copies of the Software, and permit persons to whom the Software is 16 | * furnished to do so, under the terms of the COPYING file. 17 | * 18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19 | * KIND, either express or implied. 20 | * 21 | ***************************************************************************/ 22 | 23 | #include "curl_setup.h" 24 | 25 | #include "wildcard.h" 26 | #include "llist.h" 27 | #include "fileinfo.h" 28 | /* The last 3 #include files should be in this order */ 29 | #include "curl_printf.h" 30 | #include "curl_memory.h" 31 | #include "memdebug.h" 32 | 33 | CURLcode Curl_wildcard_init(struct WildcardData *wc) 34 | { 35 | Curl_llist_init(&wc->filelist, Curl_fileinfo_dtor); 36 | wc->state = CURLWC_INIT; 37 | 38 | return CURLE_OK; 39 | } 40 | 41 | void Curl_wildcard_dtor(struct WildcardData *wc) 42 | { 43 | if(!wc) 44 | return; 45 | 46 | if(wc->tmp_dtor) { 47 | wc->tmp_dtor(wc->tmp); 48 | wc->tmp_dtor = ZERO_NULL; 49 | wc->tmp = NULL; 50 | } 51 | DEBUGASSERT(wc->tmp == NULL); 52 | 53 | Curl_llist_destroy(&wc->filelist, NULL); 54 | 55 | 56 | free(wc->path); 57 | wc->path = NULL; 58 | free(wc->pattern); 59 | wc->pattern = NULL; 60 | 61 | wc->customptr = NULL; 62 | wc->state = CURLWC_INIT; 63 | } 64 | -------------------------------------------------------------------------------- /components/curl/lib/wildcard.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CURL_WILDCARD_H 2 | #define HEADER_CURL_WILDCARD_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | #include "llist.h" 28 | 29 | /* list of wildcard process states */ 30 | typedef enum { 31 | CURLWC_CLEAR = 0, 32 | CURLWC_INIT = 1, 33 | CURLWC_MATCHING, /* library is trying to get list of addresses for 34 | downloading */ 35 | CURLWC_DOWNLOADING, 36 | CURLWC_CLEAN, /* deallocate resources and reset settings */ 37 | CURLWC_SKIP, /* skip over concrete file */ 38 | CURLWC_ERROR, /* error cases */ 39 | CURLWC_DONE /* if is wildcard->state == CURLWC_DONE wildcard loop 40 | will end */ 41 | } curl_wildcard_states; 42 | 43 | typedef void (*curl_wildcard_tmp_dtor)(void *ptr); 44 | 45 | /* struct keeping information about wildcard download process */ 46 | struct WildcardData { 47 | curl_wildcard_states state; 48 | char *path; /* path to the directory, where we trying wildcard-match */ 49 | char *pattern; /* wildcard pattern */ 50 | struct curl_llist filelist; /* llist with struct Curl_fileinfo */ 51 | void *tmp; /* pointer to protocol specific temporary data */ 52 | curl_wildcard_tmp_dtor tmp_dtor; 53 | void *customptr; /* for CURLOPT_CHUNK_DATA pointer */ 54 | }; 55 | 56 | CURLcode Curl_wildcard_init(struct WildcardData *wc); 57 | void Curl_wildcard_dtor(struct WildcardData *wc); 58 | 59 | struct Curl_easy; 60 | 61 | #endif /* HEADER_CURL_WILDCARD_H */ 62 | -------------------------------------------------------------------------------- /components/curl/loboris.ihostfull.com.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID9TCCAt2gAwIBAgIJAMFss7E3vxJQMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYD 3 | VQQGEwJIUjEQMA4GA1UECAwHQ3JvYXRpYTEPMA0GA1UEBwwGWmFncmViMQ0wCwYD 4 | VQQKDARMb0JvMQ0wCwYDVQQLDARzb2Z0MR4wHAYDVQQDDBVsb2JvcmlzLmlob3N0 5 | ZnVsbC5jb20xIDAeBgkqhkiG9w0BCQEWEWxvYm9yaXNAZ21haWwuY29tMB4XDTE3 6 | MDUwMjE5MzcwMloXDTE4MDUwMjE5MzcwMlowgZAxCzAJBgNVBAYTAkhSMRAwDgYD 7 | VQQIDAdDcm9hdGlhMQ8wDQYDVQQHDAZaYWdyZWIxDTALBgNVBAoMBExvQm8xDTAL 8 | BgNVBAsMBHNvZnQxHjAcBgNVBAMMFWxvYm9yaXMuaWhvc3RmdWxsLmNvbTEgMB4G 9 | CSqGSIb3DQEJARYRbG9ib3Jpc0BnbWFpbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA 10 | A4IBDwAwggEKAoIBAQC5UmicYX09i1ZTuzKkpgHcaaIEUdEcFOTuK6IO54PYmOUp 11 | Z4AhRSO9P7EhKPUmHD9r/2YsljHQfUKFxNhc/dzgbZRtkntSENUXSjNdy0y2yTts 12 | 8Dzd0zf9LQ7tp5x/3zlg4zPD2Fk2747PIJWoyDynTc3XIg2xO/KPSMQDwwmIgaP1 13 | yB1tgDLexxIDtGIWzG1zq5+37OadmP8hWmvAaKLFTaC9U630mMio5UjuWCOPx5gu 14 | NLRy+riYHossgdvc1OBegZYFMGXoiwrR7tMjmW91cJWzYLEyVOYZYcssKsN3369j 15 | mNiqadYxjUuvZQQLWuwVoD9jtW42eZ4qxdfxmvZ/AgMBAAGjUDBOMB0GA1UdDgQW 16 | BBSs42xPlQ0awxtFlpPHy5woAbBDOTAfBgNVHSMEGDAWgBSs42xPlQ0awxtFlpPH 17 | y5woAbBDOTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAkhpCdqAdZ 18 | y1BX6dBj9nO2kwaZxXfjwOtftcXdloN6zPChqzjJNYv8z8DCvt6IWFqmB4AFRI6o 19 | 32MXBrbbVEqmPwqhk5fMQrf895l5uG9WkzyFY2GO95Vf2jr3uRBMEIAVjHdHRBLo 20 | 77OkLcHVaqWvBvanrGWp5Ig/l/B//VUHjudKk2bMlLpP3pT1AaLtkPn4899IqnJe 21 | lSiy7TcWIRZoyUneoKY0xMkBcvHrB2R/Z/Z2k1Fsze0gd9+Q61OntSch8DxXCTvz 22 | xy8Vs2RmZ372NY8XIqWV2ubNQrEr0pBrr00tbWPG2Jb1CP5QR4dim4vZSMHfyfUS 23 | WcRpb0q5na63 24 | -----END CERTIFICATE----- 25 | -------------------------------------------------------------------------------- /components/libssh2/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | 5 | COMPONENT_SRCDIRS := ./src 6 | COMPONENT_ADD_INCLUDEDIRS := ./src ./include -------------------------------------------------------------------------------- /components/libssh2/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am,v 1.21 2009/05/07 17:21:56 bagder Exp $ 2 | AUTOMAKE_OPTIONS = foreign nostdinc 3 | 4 | # Get the CRYPTO_CSOURCES, CRYPTO_HHEADERS and CRYPTO_LTLIBS defines 5 | if OPENSSL 6 | include ../Makefile.OpenSSL.inc 7 | endif 8 | if LIBGCRYPT 9 | include ../Makefile.libgcrypt.inc 10 | endif 11 | if WINCNG 12 | include ../Makefile.WinCNG.inc 13 | endif 14 | if MBEDTLS 15 | include ../Makefile.mbedTLS.inc 16 | endif 17 | 18 | # Makefile.inc provides the CSOURCES and HHEADERS defines 19 | include ../Makefile.inc 20 | 21 | libssh2_la_SOURCES = $(CSOURCES) $(HHEADERS) 22 | 23 | EXTRA_DIST = libssh2_config.h.in libssh2_config_cmake.h.in libssh2.pc.in 24 | EXTRA_DIST += CMakeLists.txt NMakefile 25 | 26 | lib_LTLIBRARIES = libssh2.la 27 | 28 | # srcdir/include for the shipped headers 29 | # builddir/src for the generated config header when building out of the source 30 | # tree 31 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/src 32 | 33 | VERSION=-version-info 1:1:0 34 | 35 | # This flag accepts an argument of the form current[:revision[:age]]. So, 36 | # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to 37 | # 1. 38 | # 39 | # If either revision or age are omitted, they default to 0. Also note that age 40 | # must be less than or equal to the current interface number. 41 | # 42 | # Here are a set of rules to help you update your library version information: 43 | # 44 | # 1.Start with version information of 0:0:0 for each libtool library. 45 | # 46 | # 2.Update the version information only immediately before a public release of 47 | # your software. More frequent updates are unnecessary, and only guarantee 48 | # that the current interface number gets larger faster. 49 | # 50 | # 3.If the library source code has changed at all since the last update, then 51 | # increment revision (c:r+1:a) 52 | # 53 | # 4.If any interfaces have been added, removed, or changed since the last 54 | # update, increment current, and set revision to 0. (c+1:r=0:a) 55 | # 56 | # 5.If any interfaces have been added since the last public release, then 57 | # increment age. (c:r:a+1) 58 | # 59 | # 6.If any interfaces have been removed since the last public release, then 60 | # set age to 0. (c:r:a=0) 61 | # 62 | 63 | libssh2_la_LDFLAGS = $(VERSION) -no-undefined \ 64 | -export-symbols-regex '^libssh2_.*' \ 65 | $(CRYPTO_LTLIBS) $(LTLIBZ) 66 | -------------------------------------------------------------------------------- /components/libssh2/src/NMakefile: -------------------------------------------------------------------------------- 1 | !include "win32/config.mk" 2 | 3 | !include "win32/objects.mk" 4 | 5 | CFLAGS=$(CFLAGS) 6 | 7 | AR = lib 8 | ARFLAGS = -nologo /LTCG 9 | 10 | RESOURCE=$(INTDIR)\libssh2.res 11 | DLL=libssh2$(SUFFIX).dll 12 | STATICLIB=$(INTDIR)\libssh2.lib 13 | 14 | !if "$(BUILD_STATIC_LIB)" == "" 15 | all: $(DLL) 16 | !else 17 | all: $(STATICLIB) 18 | !endif 19 | 20 | $(DLL): $(OBJECTS) $(RESOURCE) 21 | $(CC) -o $(DLL) $(DLLFLAGS) $(OBJECTS) $(RESOURCE) $(LIBS) 22 | 23 | $(STATICLIB): $(OBJECTS) 24 | $(AR) $(ARFLAGS) -out:$@ $(OBJECTS) 25 | 26 | $(RESOURCE): win32\libssh2.rc 27 | $(RC) $(RCFLAGS) /Fo"$@" $? 28 | 29 | !include "win32/rules.mk" 30 | 31 | -------------------------------------------------------------------------------- /components/libssh2/src/comp.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBSSH2_COMP_H 2 | #define __LIBSSH2_COMP_H 3 | 4 | /* Copyright (C) 2009-2010 by Daniel Stenberg 5 | * 6 | * Redistribution and use in source and binary forms, 7 | * with or without modification, are permitted provided 8 | * that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above 11 | * copyright notice, this list of conditions and the 12 | * following disclaimer. 13 | * 14 | * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials 17 | * provided with the distribution. 18 | * 19 | * Neither the name of the copyright holder nor the names 20 | * of any other contributors may be used to endorse or 21 | * promote products derived from this software without 22 | * specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 25 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 26 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 27 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 29 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 31 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 32 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 34 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 36 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 37 | * OF SUCH DAMAGE. 38 | * 39 | */ 40 | 41 | #include "libssh2_priv.h" 42 | 43 | const LIBSSH2_COMP_METHOD **_libssh2_comp_methods(LIBSSH2_SESSION *session); 44 | 45 | #endif /* __LIBSSH2_COMP_H */ 46 | -------------------------------------------------------------------------------- /components/libssh2/src/global.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Lars Nordin 2 | * Copyright (C) 2010 Simon Josefsson 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, 6 | * with or without modification, are permitted provided 7 | * that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the 11 | * following disclaimer. 12 | * 13 | * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials 16 | * provided with the distribution. 17 | * 18 | * Neither the name of the copyright holder nor the names 19 | * of any other contributors may be used to endorse or 20 | * promote products derived from this software without 21 | * specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 24 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 25 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 26 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 28 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 30 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 33 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 35 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 36 | * OF SUCH DAMAGE. 37 | */ 38 | 39 | #include "libssh2_priv.h" 40 | 41 | static int _libssh2_initialized = 0; 42 | static int _libssh2_init_flags = 0; 43 | 44 | LIBSSH2_API int 45 | libssh2_init(int flags) 46 | { 47 | if (_libssh2_initialized == 0 && !(flags & LIBSSH2_INIT_NO_CRYPTO)) { 48 | libssh2_crypto_init(); 49 | #if LIBSSH2_AES_CTR 50 | _libssh2_init_aes_ctr(); 51 | #endif 52 | } 53 | 54 | _libssh2_initialized++; 55 | _libssh2_init_flags |= flags; 56 | 57 | return 0; 58 | } 59 | 60 | LIBSSH2_API void 61 | libssh2_exit(void) 62 | { 63 | if (_libssh2_initialized == 0) 64 | return; 65 | 66 | _libssh2_initialized--; 67 | 68 | if (!(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) { 69 | libssh2_crypto_exit(); 70 | } 71 | 72 | return; 73 | } 74 | 75 | void 76 | _libssh2_init_if_needed(void) 77 | { 78 | if (_libssh2_initialized == 0) 79 | (void)libssh2_init (0); 80 | } 81 | -------------------------------------------------------------------------------- /components/libssh2/src/libssh2.pc.in: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # libssh2 installation details 3 | ########################################################################### 4 | 5 | prefix=@CMAKE_INSTALL_PREFIX@ 6 | exec_prefix=${prefix} 7 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 | 10 | Name: @PROJECT_NAME@ 11 | URL: @PROJECT_URL@ 12 | Description: @PROJECT_DESCRIPTION@ 13 | Version: @LIBSSH2_VERSION@ 14 | Requires.private: @PC_REQUIRES_PRIVATE@ 15 | Libs: -L${libdir} -lssh2 @PC_LIBS@ 16 | Libs.private: @PC_LIBS@ 17 | Cflags: -I${includedir} -------------------------------------------------------------------------------- /components/libssh2/src/libssh2_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 Alexander Lamaison 2 | * 3 | * Redistribution and use in source and binary forms, 4 | * with or without modification, are permitted provided 5 | * that the following conditions are met: 6 | * 7 | * Redistributions of source code must retain the above 8 | * copyright notice, this list of conditions and the 9 | * following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following 13 | * disclaimer in the documentation and/or other materials 14 | * provided with the distribution. 15 | * 16 | * Neither the name of the copyright holder nor the names 17 | * of any other contributors may be used to endorse or 18 | * promote products derived from this software without 19 | * specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 26 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 33 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 34 | * OF SUCH DAMAGE. 35 | */ 36 | 37 | /* Headers */ 38 | #define LIBSSH2_MBEDTLS 39 | #define HAVE_O_NONBLOCK 40 | #define HAVE_UNISTD_H 41 | #define HAVE_INTTYPES_H 42 | #define HAVE_STDLIB_H 43 | #define HAVE_SYS_SELECT_H 44 | #define HAVE_SYS_SOCKET_H 45 | #define HAVE_SYS_TIME_H 46 | #define HAVE_ARPA_INET_H 47 | #define HAVE_NETINET_IN_H 48 | 49 | /* Functions */ 50 | #define HAVE_STRCASECMP 51 | #define HAVE__STRICMP 52 | #define HAVE_SNPRINTF 53 | #define HAVE__SNPRINTF 54 | 55 | /* Workaround for platforms without POSIX strcasecmp (e.g. Windows) */ 56 | #ifndef HAVE_STRCASECMP 57 | # ifdef HAVE__STRICMP 58 | # define strcasecmp _stricmp 59 | # define HAVE_STRCASECMP 60 | # endif 61 | #endif 62 | 63 | /* Symbols */ 64 | #define HAVE___FUNC__ 65 | #define HAVE___FUNCTION__ 66 | 67 | /* Workaround for platforms without C90 __func__ */ 68 | #ifndef HAVE___FUNC__ 69 | # ifdef HAVE___FUNCTION__ 70 | # define __func__ __FUNCTION__ 71 | # define HAVE___FUNC__ 72 | # endif 73 | #endif 74 | -------------------------------------------------------------------------------- /components/libssh2/src/mac.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBSSH2_MAC_H 2 | #define __LIBSSH2_MAC_H 3 | 4 | /* Copyright (C) 2009-2010 by Daniel Stenberg 5 | * 6 | * Redistribution and use in source and binary forms, 7 | * with or without modification, are permitted provided 8 | * that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above 11 | * copyright notice, this list of conditions and the 12 | * following disclaimer. 13 | * 14 | * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials 17 | * provided with the distribution. 18 | * 19 | * Neither the name of the copyright holder nor the names 20 | * of any other contributors may be used to endorse or 21 | * promote products derived from this software without 22 | * specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 25 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 26 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 27 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 29 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 31 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 32 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 34 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 36 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 37 | * OF SUCH DAMAGE. 38 | * 39 | */ 40 | 41 | #include "libssh2_priv.h" 42 | 43 | struct _LIBSSH2_MAC_METHOD 44 | { 45 | const char *name; 46 | 47 | /* The length of a given MAC packet */ 48 | int mac_len; 49 | 50 | /* integrity key length */ 51 | int key_len; 52 | 53 | /* Message Authentication Code Hashing algo */ 54 | int (*init) (LIBSSH2_SESSION * session, unsigned char *key, int *free_key, 55 | void **abstract); 56 | int (*hash) (LIBSSH2_SESSION * session, unsigned char *buf, 57 | uint32_t seqno, const unsigned char *packet, 58 | uint32_t packet_len, const unsigned char *addtl, 59 | uint32_t addtl_len, void **abstract); 60 | int (*dtor) (LIBSSH2_SESSION * session, void **abstract); 61 | }; 62 | 63 | typedef struct _LIBSSH2_MAC_METHOD LIBSSH2_MAC_METHOD; 64 | 65 | const LIBSSH2_MAC_METHOD **_libssh2_mac_methods(void); 66 | 67 | #endif /* __LIBSSH2_MAC_H */ 68 | -------------------------------------------------------------------------------- /components/libssh2/src/userauth.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBSSH2_USERAUTH_H 2 | #define LIBSSH2_USERAUTH_H 3 | /* Copyright (c) 2004-2007, Sara Golemon 4 | * Copyright (c) 2009-2010 by Daniel Stenberg 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, 8 | * with or without modification, are permitted provided 9 | * that the following conditions are met: 10 | * 11 | * Redistributions of source code must retain the above 12 | * copyright notice, this list of conditions and the 13 | * following disclaimer. 14 | * 15 | * Redistributions in binary form must reproduce the above 16 | * copyright notice, this list of conditions and the following 17 | * disclaimer in the documentation and/or other materials 18 | * provided with the distribution. 19 | * 20 | * Neither the name of the copyright holder nor the names 21 | * of any other contributors may be used to endorse or 22 | * promote products derived from this software without 23 | * specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 26 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 27 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 30 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 32 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 33 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 35 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 37 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 38 | * OF SUCH DAMAGE. 39 | */ 40 | 41 | int 42 | _libssh2_userauth_publickey(LIBSSH2_SESSION *session, 43 | const char *username, 44 | unsigned int username_len, 45 | const unsigned char *pubkeydata, 46 | unsigned long pubkeydata_len, 47 | LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC((*sign_callback)), 48 | void *abstract); 49 | 50 | #endif /* LIBSSH2_USERAUTH_H */ 51 | -------------------------------------------------------------------------------- /components/libssh2/src/version.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2009 Daniel Stenberg. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, 4 | * with or without modification, are permitted provided 5 | * that the following conditions are met: 6 | * 7 | * Redistributions of source code must retain the above 8 | * copyright notice, this list of conditions and the 9 | * following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following 13 | * disclaimer in the documentation and/or other materials 14 | * provided with the distribution. 15 | * 16 | * Neither the name of the copyright holder nor the names 17 | * of any other contributors may be used to endorse or 18 | * promote products derived from this software without 19 | * specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 26 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 33 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 34 | * OF SUCH DAMAGE. 35 | * 36 | */ 37 | 38 | #include "libssh2_priv.h" 39 | 40 | /* 41 | libssh2_version() can be used like this: 42 | 43 | if (!libssh2_version(LIBSSH2_VERSION_NUM)) { 44 | fprintf (stderr, "Runtime libssh2 version too old!\n"); 45 | exit(1); 46 | } 47 | */ 48 | LIBSSH2_API 49 | const char *libssh2_version(int req_version_num) 50 | { 51 | if(req_version_num <= LIBSSH2_VERSION_NUM) 52 | return LIBSSH2_VERSION; 53 | return NULL; /* this is not a suitable library! */ 54 | } 55 | -------------------------------------------------------------------------------- /components/pppos/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | 5 | COMPONENT_SRCDIRS := . 6 | COMPONENT_ADD_INCLUDEDIRS := . -------------------------------------------------------------------------------- /components/pppos/libGSM.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: LoBo (loboris@gmail.com, loboris.github) 3 | * 4 | */ 5 | 6 | 7 | #ifndef _LIBGSM_H_ 8 | #define _LIBGSM_H_ 9 | 10 | #include "sdkconfig.h" 11 | 12 | #ifdef CONFIG_EXAMPLE_USE_GSM 13 | 14 | #define GSM_STATE_DISCONNECTED 0 15 | #define GSM_STATE_CONNECTED 1 16 | #define GSM_STATE_IDLE 89 17 | #define GSM_STATE_FIRSTINIT 98 18 | 19 | 20 | typedef struct 21 | { 22 | int idx; 23 | char *msg; 24 | char stat[32]; 25 | char from[32]; 26 | char time[32]; 27 | time_t time_value; 28 | int tz; 29 | }SMS_Msg; 30 | 31 | typedef struct 32 | { 33 | int nmsg; 34 | SMS_Msg *messages; 35 | }SMS_Messages; 36 | 37 | /* 38 | * Create GSM/PPPoS task if not already created 39 | * Initialize GSM and connect to Internet 40 | * Handle all PPPoS requests 41 | * Disconnect/Reconnect from/to Internet on user request 42 | */ 43 | //============== 44 | int ppposInit(); 45 | 46 | /* 47 | * Disconnect from Internet 48 | * If 'end_task' = 1 also terminate GSM/PPPoS task 49 | * If 'rfoff' = 1, turns off GSM RF section to preserve power 50 | * If already disconnected, this function does nothing 51 | */ 52 | //==================================================== 53 | void ppposDisconnect(uint8_t end_task, uint8_t rfoff); 54 | 55 | /* 56 | * Get transmitted and received bytes count 57 | * If 'rst' = 1, resets the counters 58 | */ 59 | //========================================================= 60 | void getRxTxCount(uint32_t *rx, uint32_t *tx, uint8_t rst); 61 | 62 | /* 63 | * Resets transmitted and received bytes counters 64 | */ 65 | //==================== 66 | void resetRxTxCount(); 67 | 68 | /* 69 | * Get GSM/Task status 70 | * 71 | * Result: 72 | * GSM_STATE_DISCONNECTED (0) Disconnected from Internet 73 | * GSM_STATE_CONNECTED (1) Connected to Internet 74 | * GSM_STATE_IDLE (89) Disconnected from Internet, Task idle, waiting for reconnect request 75 | * GSM_STATE_FIRSTINIT (98) Task started, initializing PPPoS 76 | */ 77 | //================ 78 | int ppposStatus(); 79 | 80 | /* 81 | * Turn GSM RF Off 82 | */ 83 | //============== 84 | int gsm_RFOff(); 85 | 86 | /* 87 | * Turn GSM RF On 88 | */ 89 | //============= 90 | int gsm_RFOn(); 91 | 92 | /* 93 | * Send SMS 94 | * 95 | * Params: 96 | * smsnum: Pointer to phone number in international format (+) 97 | * msg: Pointer to message text 98 | */ 99 | //================================== 100 | int smsSend(char *smsnum, char *msg); 101 | 102 | /* 103 | * Read all SMS messages to 'SMS_Messages' structure 104 | */ 105 | //============================================ 106 | void smsRead(SMS_Messages *SMSmesg, int sort); 107 | 108 | /* 109 | * Delete the message at GSM message index 'idx' 110 | */ 111 | int smsDelete(int idx); 112 | 113 | #endif 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /components/quickmail/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | 5 | COMPONENT_SRCDIRS := . 6 | COMPONENT_ADD_INCLUDEDIRS := . -------------------------------------------------------------------------------- /components/zlib/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | 5 | COMPONENT_SRCDIRS := . 6 | COMPONENT_ADD_INCLUDEDIRS := . -------------------------------------------------------------------------------- /components/zlib/compress.c: -------------------------------------------------------------------------------- 1 | /* compress.c -- compress a memory buffer 2 | * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Compresses the source buffer into the destination buffer. The level 13 | parameter has the same meaning as in deflateInit. sourceLen is the byte 14 | length of the source buffer. Upon entry, destLen is the total size of the 15 | destination buffer, which must be at least 0.1% larger than sourceLen plus 16 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 17 | 18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, 20 | Z_STREAM_ERROR if the level parameter is invalid. 21 | */ 22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) 23 | Bytef *dest; 24 | uLongf *destLen; 25 | const Bytef *source; 26 | uLong sourceLen; 27 | int level; 28 | { 29 | z_stream stream; 30 | int err; 31 | const uInt max = (uInt)-1; 32 | uLong left; 33 | 34 | left = *destLen; 35 | *destLen = 0; 36 | 37 | stream.zalloc = (alloc_func)0; 38 | stream.zfree = (free_func)0; 39 | stream.opaque = (voidpf)0; 40 | 41 | err = deflateInit(&stream, level); 42 | if (err != Z_OK) return err; 43 | 44 | stream.next_out = dest; 45 | stream.avail_out = 0; 46 | stream.next_in = (z_const Bytef *)source; 47 | stream.avail_in = 0; 48 | 49 | do { 50 | if (stream.avail_out == 0) { 51 | stream.avail_out = left > (uLong)max ? max : (uInt)left; 52 | left -= stream.avail_out; 53 | } 54 | if (stream.avail_in == 0) { 55 | stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; 56 | sourceLen -= stream.avail_in; 57 | } 58 | err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); 59 | } while (err == Z_OK); 60 | 61 | *destLen = stream.total_out; 62 | deflateEnd(&stream); 63 | return err == Z_STREAM_END ? Z_OK : err; 64 | } 65 | 66 | /* =========================================================================== 67 | */ 68 | int ZEXPORT compress (dest, destLen, source, sourceLen) 69 | Bytef *dest; 70 | uLongf *destLen; 71 | const Bytef *source; 72 | uLong sourceLen; 73 | { 74 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 75 | } 76 | 77 | /* =========================================================================== 78 | If the default memLevel or windowBits for deflateInit() is changed, then 79 | this function needs to be updated. 80 | */ 81 | uLong ZEXPORT compressBound (sourceLen) 82 | uLong sourceLen; 83 | { 84 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 85 | (sourceLen >> 25) + 13; 86 | } 87 | -------------------------------------------------------------------------------- /components/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /components/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main Makefile. This is basically the same as a component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /partitions_example.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 0x140000, 6 | storage, data, fat, , 0x140000, 7 | -------------------------------------------------------------------------------- /sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_PARTITION_TABLE_CUSTOM=y 2 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv" 3 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 4 | CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv" 5 | CONFIG_APP_OFFSET=0x10000 6 | CONFIG_TCPIP_TASK_STACK_SIZE=4096 7 | CONFIG_ESP32_PANIC_PRINT_HALT=y 8 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 9 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16 10 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 11 | CONFIG_FREERTOS_HZ=1000 12 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=2 13 | CONFIG_LWIP_SO_REUSE=y 14 | CONFIG_TCPIP_TASK_STACK_SIZE=8192 15 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192 16 | CONFIG_ESPTOOLPY_AFTER_NORESET=y 17 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 18 | CONFIG_ESPTOOLPY_BAUD_921600B=y 19 | --------------------------------------------------------------------------------